Hi

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
these.
* 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
RandomAccessFile.

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.

Damjan


On Thu, Jun 6, 2013 at 1:13 PM, Leos Literak <liter...@centrum.cz> wrote:
> I understand Stephan. I am happy to see the first partial java 
> implementation. The situation is bad - no java support, unix version lacks 
> some features (multi volume support). I have to maintain one proprietary 
> implementation and I seek how to replace it. Well, at least I can study your 
> reader, as I hate 7zFormat.txt. It is not formal and I have to guess what its 
> author meant.
>
> Leoš
>
> ______________________________________________________________
>> Od: "Stefan Bodewig" <bode...@apache.org>
>> Komu: <user@commons.apache.org>
>> Datum: 06.06.2013 12:58
>> Předmět: Re: [compress] create 7zip archive
>>
> On 2013-06-06, <liter...@centrum.cz> wrote:
>
>> I realized that trunk has support for reading 7z archive.
>
> And even read support is incomplete, we currently lack LZMA support
> (only LZMA2 is present).  The good news is that XZ for Java's trunk now
> supports LZMA directly so we are on our way to complete read support.
>
>> But I miss write 7z archive feature. Would you consider adding this
>> feature?
>
> Consider?  Sure.  It's just a matter of anybody finding the time to
> write the code :-)
>
> More seriously, even read-only support is pretty new and it took a lot
> of effort, there is no ETA for write support.
>
> Stefan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
> For additional commands, e-mail: user-h...@commons.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
> For additional commands, e-mail: user-h...@commons.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org

Reply via email to