commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leos Literak <>
Subject Re: [compress] create 7zip archive
Date Thu, 06 Jun 2013 11:53:41 GMT
HI Damjan,
that would be awesome! I just need anything that 7z can uncompress. I do not care of passwords
or selection of compression algorithm. I am OK with RandomAccessFile.
Ad "spec" - I downloaded lzma922.tar.bz2 - I consider it as latest. Or do you have newer file
format description?
> Od: "Damjan Jovanovic" <>
> Komu: Commons Users List <>
> Datum: 06.06.2013 13:41
> Předmět: Re: [compress] create 7zip archive

I wrote the read support. Writing is tricky for several reasons:
* We need lzma for archive header compression (good to hear XZ has it
now Stefan!). It's optional but beneficial.
* No [compress] API exists for setting the password to use when writing.
* 7z supports "solid compression" in several variants: disabled, one
solid block per all files with the same extension, multiple solid
blocks of X megabytes in size, one solid block for all files, etc.
This gets complex to implement, and we need some way to configure
* Writing cannot be implemented using (Archive)OutputStream and less
than O(n) memory, as fields written earlier in the file are only known
at the end of the compression process. So once again we need

But I'll see if I can hack together a simple unencrypted
no-solid-compression writer that we can gradually improve.

Yes, the 7zip GUI is generally a Windows-only tool (although it works
well in Wine), and even the 7z file format is very Windows-specific
(NTFS timestamps, Windows attributes, little-endian values, etc.).
7zFormat.txt has mistakes (though the one in the 7z920 package is
better than the one in the lzma920 package) and even the reference
implementation differs from it, which is why I had to port from C/C++
and give credit in NOTICE.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message