From issues-return-65839-archive-asf-public=cust-asf.ponee.io@commons.apache.org Wed Jan 10 12:52:10 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id 178BB18072F for ; Wed, 10 Jan 2018 12:52:10 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 07EA5160C2E; Wed, 10 Jan 2018 11:52:10 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 4D7CD160C23 for ; Wed, 10 Jan 2018 12:52:09 +0100 (CET) Received: (qmail 38741 invoked by uid 500); 10 Jan 2018 11:52:08 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 38730 invoked by uid 99); 10 Jan 2018 11:52:08 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Jan 2018 11:52:08 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id E2BC7C24C9 for ; Wed, 10 Jan 2018 11:52:07 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.711 X-Spam-Level: X-Spam-Status: No, score=-100.711 tagged_above=-999 required=6.31 tests=[RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id 9x7t-JXUyykk for ; Wed, 10 Jan 2018 11:52:07 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 9C9D65F36B for ; Wed, 10 Jan 2018 11:52:06 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 49FFAE041F for ; Wed, 10 Jan 2018 11:52:03 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 969CD274CC for ; Wed, 10 Jan 2018 11:52:01 +0000 (UTC) Date: Wed, 10 Jan 2018 11:52:01 +0000 (UTC) From: "Valentin Brandl (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (COMPRESS-439) Compressing and decompressing using Pack200 does not produce the original input MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Valentin Brandl created COMPRESS-439: ---------------------------------------- Summary: Compressing and decompressing using Pack200 does not produce the original input Key: COMPRESS-439 URL: https://issues.apache.org/jira/browse/COMPRESS-439 Project: Commons Compress Issue Type: Bug Components: Compressors Affects Versions: 1.14 Environment: Windows 7; # java -version java version "1.8.0_151" Java(TM) SE Runtime Environment (build 1.8.0_151-b12) Java HotSpot(TM) 64-Bit Server VM (build 25.151-b12, mixed mode) Reporter: Valentin Brandl Attachments: Test.java I just tested different compressors using [JUnitQuickcheck](https://github.com/pholser/junit-quickcheck). The tests should compress and then decompress some input and the result should be equal to the input. For gzip, bzip2, deflate and xz, this works as intended but pack200 seems to have some problems. I will attach the testcase I wrote. It seems that for empty input, the result won't be empty. Test output: ``` input.length = 0 input = [] compressed.length = 19 compressed = [-54, -2, -48, 13, 7, -106, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 3, 45, 0] decompressed.length = 29 decompressed = [80, 75, 5, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 80, 65, 67, 75, 50, 48, 48] ``` -- This message was sent by Atlassian JIRA (v6.4.14#64029)