Jump to page: 1 2
Thread overview
std.sevenzip - Do you need it?
Jan 30, 2015
data man
Jan 30, 2015
Max Klyga
Jan 30, 2015
FG
Jan 30, 2015
H. S. Teoh
Jan 30, 2015
FG
Jan 31, 2015
data man
Jan 30, 2015
Brad Anderson
Jan 31, 2015
Daniel Murphy
Jan 31, 2015
MrSmith
Jan 30, 2015
ketmar
Jan 31, 2015
data man
Jan 31, 2015
Jacob Carlborg
Mar 25, 2015
Suliman
January 30, 2015
Right now I'm working on std.sevenzip (7-zip by Igor Pavlov).

The main features of 7-Zip:
- High compression ratio in 7z format with LZMA and LZMA2 compression
- Supported formats:
  - Packing / unpacking: 7z, XZ, BZIP2, GZIP, TAR, ZIP and WIM
  - Unpacking only: ARJ, CAB, CHM, CPIO, CramFS, DEB, DMG, FAT, HFS, ISO, LZH, LZMA, MBR, MSI, NSIS, NTFS, RAR, RPM, SquashFS, UDF, VHD, WIM, XAR and Z.
  - For ZIP and GZIP formats, 7-Zip provides a compression ratio that is 2-10 % better than the ratio provided by PKZip and WinZip
- Strong AES-256 encryption in 7z and ZIP formats

Why are there - everybody knows it :-)

My question is: how best to do - one big module std.sevenzip or divided into sub-modules:

std.sevenzip.aes
std.sevenzip.lzma
std.sevenzip.lzma2
std.sevenzip.ppmd
std.sevenzip.sha256
std.sevenzip.xz
...etc.

Or there is the issue of the license? (http://7-zip.org/license.txt)
January 30, 2015
On 2015-01-30 16:01:27 +0000, data man said:

> Right now I'm working on std.sevenzip (7-zip by Igor Pavlov).
> 
> The main features of 7-Zip:
> - High compression ratio in 7z format with LZMA and LZMA2 compression
> - Supported formats:
>    - Packing / unpacking: 7z, XZ, BZIP2, GZIP, TAR, ZIP and WIM
>    - Unpacking only: ARJ, CAB, CHM, CPIO, CramFS, DEB, DMG, FAT, HFS, ISO, LZH, LZMA, MBR, MSI, NSIS, NTFS, RAR, RPM, SquashFS, UDF, VHD, WIM, XAR and Z.
>    - For ZIP and GZIP formats, 7-Zip provides a compression ratio that is 2-10 % better than the ratio provided by PKZip and WinZip
> - Strong AES-256 encryption in 7z and ZIP formats
> 
> Why are there - everybody knows it :-)
> 
> My question is: how best to do - one big module std.sevenzip or divided into sub-modules:
> 
> std.sevenzip.aes
> std.sevenzip.lzma
> std.sevenzip.lzma2
> std.sevenzip.ppmd
> std.sevenzip.sha256
> std.sevenzip.xz
> ...etc.
> 
> Or there is the issue of the license? (http://7-zip.org/license.txt)

Is this a port or binding for some existing library?
Also all phobos submissions must be Boost licenced.

If this is a binding or code cannot be relicenced this might better be suited for inclusion in DUB registry

January 30, 2015
On 2015-01-30 at 19:12, Max Klyga wrote:
> Is this a port or binding for some existing library?
> Also all phobos submissions must be Boost licenced.
>
> If this is a binding or code cannot be relicenced this might better be suited for inclusion in DUB registry

I wonder if it would be possible to get special license terms for the use of 7zip in Phobos.

LGPL is not compatible with the Boost License. Suppose that you write a closed-source application. Apart from having to inform about the use of an LGPL library in the application, LGPL requires that you allow the user to relink the application with a modified version of the library. That pretty much implies that the application has to be dynamically linked, because if it can't, things become quite problematic.

Therefore, sadly, code from 7zip is unlikely to get into the standard library.
January 30, 2015
On Fri, Jan 30, 2015 at 08:30:02PM +0100, FG via Digitalmars-d wrote:
> On 2015-01-30 at 19:12, Max Klyga wrote:
> >Is this a port or binding for some existing library?
> >Also all phobos submissions must be Boost licenced.
> >
> >If this is a binding or code cannot be relicenced this might better be suited for inclusion in DUB registry
> 
> I wonder if it would be possible to get special license terms for the use of 7zip in Phobos.
> 
> LGPL is not compatible with the Boost License. Suppose that you write a closed-source application. Apart from having to inform about the use of an LGPL library in the application, LGPL requires that you allow the user to relink the application with a modified version of the library. That pretty much implies that the application has to be dynamically linked, because if it can't, things become quite problematic.
> 
> Therefore, sadly, code from 7zip is unlikely to get into the standard library.

OTOH, wouldn't a clean-room reimplementation of it be permissible? (And perhaps even desirable, since it can then take advantage of D instead of just wrapping around C/C++ code?)


T

-- 
Political correctness: socially-sanctioned hypocrisy.
January 30, 2015
On Friday, 30 January 2015 at 16:01:29 UTC, data man wrote:
> [snip]
> Or there is the issue of the license? (http://7-zip.org/license.txt)

As other said, the license is an issue but even if it weren't people are pretty opposed to including third party libraries in Phobos these days. The inclusion of zlib and (especially) curl are often considered a mistake.

I'm mostly of the opinion that we should be relying less on Phobos and more on dub going forward. sevenzip would be a great addition to the dub registry.
January 30, 2015
On 2015-01-30 at 20:39, H. S. Teoh via Digitalmars-d wrote:
> OTOH, wouldn't a clean-room reimplementation of it be permissible? (And
> perhaps even desirable, since it can then take advantage of D instead of
> just wrapping around C/C++ code?)

Maybe clean-room won't be necessary. We were looking in the wrong place. There is http://www.7-zip.org/sdk.html - which is in public domain, and contains LZMA, LZMA2, and XZ compression and decompression algorithms in C, plus a C/C++ minimal utility for handling 7z files. It probably doesn't handle encryption and definitely doesn't cover other archive formats supported by 7-zip (the application).

Well, screw RAR, because no-one is allowed to write a compressor anyway, but add support for TAR and perhaps BZIP2 and we should be quite happy. And, if someone was willing to implement DEFLATE, even using zlib wouldn't be required any more (which some don't like, as mentioned below). :)


On 2015-01-30 at 21:34, Brad Anderson wrote:
> As other said, the license is an issue but even if it weren't people are pretty opposed to including third party libraries in Phobos these days. The inclusion of zlib and (especially) curl are often considered a mistake.
>
> I'm mostly of the opinion that we should be relying less on Phobos and more on dub going forward. sevenzip would be a great addition to the dub registry.
January 30, 2015
On Friday, 30 January 2015 at 20:44:52 UTC, FG wrote:
> and we should be quite happy. And, if someone was willing to implement DEFLATE, even using zlib wouldn't be required any more (which some don't like, as mentioned below). :)

Haven't used it, but public domain deflate:

https://code.google.com/p/miniz/

Just search for "public domain compression" and you'll find starting points:

https://www.google.no/?q=public%20domain%20compression
January 30, 2015
On Fri, 30 Jan 2015 16:01:27 +0000, data man wrote:

> Right now I'm working on std.sevenzip (7-zip by Igor Pavlov).
is it bindings or complete port?

> My question is: how best to do - one big module std.sevenzip or divided into sub-modules:
submodules.

don't aim Phobos inclusion from the start. choose your own namespace and work with it. then release the thing, than have two years of discussion, and only then you maybe get to `std.experimental`. ;-)

January 31, 2015
"Brad Anderson"  wrote in message news:vqkaztokcfgdbykbilxc@forum.dlang.org...

> I'm mostly of the opinion that we should be relying less on Phobos and more on dub going forward. sevenzip would be a great addition to the dub registry.

Yes please. 

January 31, 2015
On Saturday, 31 January 2015 at 04:30:06 UTC, Daniel Murphy wrote:
> "Brad Anderson"  wrote in message news:vqkaztokcfgdbykbilxc@forum.dlang.org...
>
>> I'm mostly of the opinion that we should be relying less on Phobos and more on dub going forward. sevenzip would be a great addition to the dub registry.
>
> Yes please.

+1
« First   ‹ Prev
1 2