commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Bodewig (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (COMPRESS-261) Unable to set SevenZOutputFile.setContentCompression() per SevenZArchiveEntry
Date Fri, 21 Feb 2014 14:30:20 GMT

     [ https://issues.apache.org/jira/browse/COMPRESS-261?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Stefan Bodewig updated COMPRESS-261:
------------------------------------

    Fix Version/s: 1.8

> Unable to set SevenZOutputFile.setContentCompression() per SevenZArchiveEntry
> -----------------------------------------------------------------------------
>
>                 Key: COMPRESS-261
>                 URL: https://issues.apache.org/jira/browse/COMPRESS-261
>             Project: Commons Compress
>          Issue Type: Bug
>    Affects Versions: 1.7
>         Environment: xz-1.4.jar is used as LMZA lib
>            Reporter: Peter Sauer
>            Priority: Minor
>             Fix For: 1.8
>
>
> I am unable to set the compression method per archive entry. In my example I try to switch
from LZMA2 to COPY for the second entry. But 7zip says that both entry has COPY as compression
method. 
> {code}
> public static void main(String args[]) throws Exception {
> 		String t = "Das ist ein kleiner Test!";
> 		SevenZOutputFile sevenZOutput = new SevenZOutputFile(new File(
> 				"c:/tmp/test.7z"));
> 		sevenZOutput.setContentCompression(SevenZMethod.LZMA2);
> 		SevenZArchiveEntry entry = new SevenZArchiveEntry();
> 		entry.setName("test");
> 		sevenZOutput.putArchiveEntry(entry);
> 		sevenZOutput.write(t.getBytes());
> 		sevenZOutput.closeArchiveEntry();
>                sevenZOutput.setContentCompression(SevenZMethod.COPY);	
> 		entry = new SevenZArchiveEntry();
> 		entry.setName("test2");
> 		sevenZOutput.putArchiveEntry(entry);
> 		sevenZOutput.write(t.getBytes());
> 		sevenZOutput.closeArchiveEntry();
> 		sevenZOutput.finish();	
> 		sevenZOutput.close();
> 	}
> {code}



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message