You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by li...@centrum.cz on 2013/06/06 12:45:48 UTC

[compress] create 7zip archive

Hello,
 
I realized that trunk has support for reading 7z archive. That is great news. But I miss write 7z archive feature. Would you consider adding this feature? There is no java implementation at all.
 
Leoš

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


Re: [compress] create 7zip archive

Posted by Leos Literak <li...@centrum.cz>.
Hi,
 
great to see. Btw writeUint64() is elegant.
 
Leoš
 
______________________________________________________________
> Od: "Damjan Jovanovic" <da...@apache.org>
> Komu: Commons Users List <us...@commons.apache.org>
> Datum: 10.06.2013 17:26
> Předmět: Re: [compress] create 7zip archive
>
On Thu, Jun 6, 2013 at 12:45 PM,  <li...@centrum.cz> wrote:
> Hello,
>
> I realized that trunk has support for reading 7z archive. That is great news. But I miss write 7z archive feature. Would you consider adding this feature? There is no java implementation at all.
>
> Leoš

I've just committed preliminary uncompressed 7z write support to SVN.

Enjoy
Damjan

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

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


Re: [compress] create 7zip archive

Posted by Damjan Jovanovic <da...@apache.org>.
On Thu, Jun 6, 2013 at 12:45 PM,  <li...@centrum.cz> wrote:
> Hello,
>
> I realized that trunk has support for reading 7z archive. That is great news. But I miss write 7z archive feature. Would you consider adding this feature? There is no java implementation at all.
>
> Leoš

I've just committed preliminary uncompressed 7z write support to SVN.

Enjoy
Damjan

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


Re: [compress] create 7zip archive

Posted by Damjan Jovanovic <da...@gmail.com>.
The opposite method is COutArchive::WriteNumber() in file
CPP/7zip/Archive/7z/7zOut.cpp in the LZMA SDK.

Damjan

On Thu, Jun 6, 2013 at 7:05 PM, Leos Literak <li...@centrum.cz> wrote:
> Damjan,
>
> are you aware of opposite method to readUint64? I found a bug in our implementation and it is really ugly written. I wonder that writing from scratch would be faster than understanding it :-) I just first want to ensure that it does not exist. I have already googled.
>
> Thanks
>
> Leos
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>

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


Re: [compress] create 7zip archive

Posted by Leos Literak <li...@centrum.cz>.
Damjan,
 
are you aware of opposite method to readUint64? I found a bug in our implementation and it is really ugly written. I wonder that writing from scratch would be faster than understanding it :-) I just first want to ensure that it does not exist. I have already googled.
 
Thanks
 
Leos

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


Re: [compress] create 7zip archive

Posted by Damjan Jovanovic <da...@gmail.com>.
Ok, I'll see what I can do.

The 7zFormat.txt in
http://downloads.sourceforge.net/sevenzip/7z920.tar.bz2 seems newer /
more accurate.

Damjan


On Thu, Jun 6, 2013 at 1:53 PM, Leos Literak <li...@centrum.cz> wrote:
> 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?
>
> Leoš
>
> ______________________________________________________________
>> Od: "Damjan Jovanovic" <da...@gmail.com>
>> Komu: Commons Users List <us...@commons.apache.org>
>> Datum: 06.06.2013 13:41
>> Předmět: Re: [compress] create 7zip archive
>>
> 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
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>

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


Re: [compress] create 7zip archive

Posted by Leos Literak <li...@centrum.cz>.
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?
 
Leoš
 
______________________________________________________________
> Od: "Damjan Jovanovic" <da...@gmail.com>
> Komu: Commons Users List <us...@commons.apache.org>
> Datum: 06.06.2013 13:41
> Předmět: Re: [compress] create 7zip archive
>
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

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


Re: [compress] create 7zip archive

Posted by Damjan Jovanovic <da...@gmail.com>.
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 <li...@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" <bo...@apache.org>
>> Komu: <us...@commons.apache.org>
>> Datum: 06.06.2013 12:58
>> Předmět: Re: [compress] create 7zip archive
>>
> On 2013-06-06, <li...@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-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>

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


Re: [compress] create 7zip archive

Posted by Leos Literak <li...@centrum.cz>.
Multi-volume - I have figured it out already :-(
 
I need to transfer 150+ MB files to our service provider and a transfer time is out of transaction length. The provider accepts multivolume zip/7z as well, but there is no java / unix support to chunk these archives. 7z format can be easily binary split, zip cannot.
 
Spec - I started to create an HTML page, so I can at least use links to jump between each definition. Could you please contact me with Damjan him to verify my findings? I will post the result, if it will be worth of.
 
Thanks
 
Leoš
 
______________________________________________________________
> Od: "Stefan Bodewig" <bo...@apache.org>
> Komu: <us...@commons.apache.org>
> Datum: 06.06.2013 13:37
> Předmět: Re: [compress] create 7zip archive
>
On 2013-06-06, Leos Literak 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).

Well, I don't expect us to support everything either.  We don't support
multiple volumes in the zip package, for example.

> 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.

Kudos to Damjan who figured things out for us, but I recall him saying
something similar about the quality of "the spec".

Stefan

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

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


Re: [compress] create 7zip archive

Posted by Stefan Bodewig <bo...@apache.org>.
On 2013-06-06, Leos Literak 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).

Well, I don't expect us to support everything either.  We don't support
multiple volumes in the zip package, for example.

> 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.

Kudos to Damjan who figured things out for us, but I recall him saying
something similar about the quality of "the spec".

Stefan

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


Re: [compress] create 7zip archive

Posted by Leos Literak <li...@centrum.cz>.
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" <bo...@apache.org>
> Komu: <us...@commons.apache.org>
> Datum: 06.06.2013 12:58
> Předmět: Re: [compress] create 7zip archive
>
On 2013-06-06, <li...@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-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org

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


Re: [compress] create 7zip archive

Posted by Stefan Bodewig <bo...@apache.org>.
On 2013-06-06, <li...@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-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org