Menu

#1333 Decompression for zlib stream without zlib header

open
nobody
None
5
2023-10-01
2017-10-26
Mirco Babin
No

I have files compressed ase zlib stream, which can't be opened by 7-zip. And therefore can't be decompressed by 7-zip.

In this case the entire file is a zlib stream, without zlib header. E.g. see attachment tripstandaard.sqlbu.zlib.

If I select open archive tripstandaard.sqlbu.zlib from 7-zip and it isn't an recognized archive, it would be very nice if 7-zip would recognize the .zlib extension. And validates that the entire file is in fact a zlib stream.

There would be one file in the zlib-stream-archive named tripstandaard.sqlbu (without the .zlib). Which can be extracted/decompressed.

I now use http://aluigi.altervista.org/mytoolz.htm#offzip to decompress. Would be very great if I didn't need this tool anymore.

1 Attachments

Discussion

  • Igor Pavlov

    Igor Pavlov - 2017-10-28

    Probably zlib stream format (as file) is not too widely used.
    What programs use it?

     
  • Igor Pavlov

    Igor Pavlov - 2017-10-28

    There is some (OLD ?) delphi tool that can create such files?
    It's too rare case to support it.

     
    • Mirco Babin

      Mirco Babin - 2017-10-29

      Well actually also PHP has such functionality. And probably many
      other languages as well. It is because the zlib library https://zlib.net/
      exposes stream functionality. E.g. Python
      https://unix.stackexchange.com/questions/22834/how-to-uncompress-zlib-data-in-unix

      Is it mainstream ? Actually yes, considering the HTTP protocol can encode
      the body as a zlib stream. But no if you think in the amount of
      public compression utilities available.

      I have no statistical data how frequently zlib stream is used.

      In all cases renaming the file to .ZLIB would be sufficient to be opened by
      7-zip. Would 7-zip decide to support it.

      Kind regards,
      Mirco Babin

       

      Last edit: Igor Pavlov 2017-10-29
  • Igor Pavlov

    Igor Pavlov - 2017-10-29

    I know that some programs use zlib streams internally as part of another formats. And 7-Zip supports zlib decoding in these formats:
    Cramfs, Dmg, Hfs, Squashfs, Swf, Vmdk, Xar.

    But probably nobody shows these internal streams as external zlib files. So there is no need to support them.
    There is no source of such zlib files.

     

    Last edit: Igor Pavlov 2017-10-29
    • Mirco Babin

      Mirco Babin - 2017-10-29

      There are cases of zlib stream files. If you encounter them it will be hard
      to decompress them. Maybe it's indeed a corner case. I guess mainly
      software programmers/system administrators trying to batch / shell script
      are the audience.

      Searching for zlib stream decompression mostly gives programmers questions
      and solutions. E.g.
      https://stackoverflow.com/questions/3178566/deflate-command-line-tool. If
      you don't think this fits the 7-zip goals, ok.

      Kind regards,
      Mirco Babin

       

      Last edit: Igor Pavlov 2017-10-29
  • Igor Pavlov

    Igor Pavlov - 2017-10-29

    So blobs (objects) in git are stored as external zlib files?
    If it useful to unpack them, Maybe I'll think about that feature.

     
  • Luis Simao

    Luis Simao - 2018-03-23

    I'm looking for such feature also. I agree with Mirco, zlib stream decompression would be very usefull for many programmers.
    BR

     
  • Mirco Babin

    Mirco Babin - 2018-05-16

    I found out that MySQL also uses this ZLIB stream compression. MySQL 5.7.22 community edition even has a special utility in the bin directory called zlib_decompress.exe.

    D:\MySQL\MySQL Server\bin>zlib_decompress.exe
    zlib_decompress  Ver 1.6 for Win64 at x86_64
    Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
    
    Oracle is a registered trademark of Oracle Corporation and/or its
    affiliates. Other names may be trademarks of their respective
    owners.
    
    Decompress data compressed by mysqlpump using zlib compression algorithm by reading from input file and writing uncompressed data to output file
    Usage: zlib_decompress input_file output_file
    
     
  • Dmitriy Kostromin

    I need now this feature :(.... boost iostreams library works with zlib - and use zlib as backend. It creates zlib archive files - i thought 7zip supports this trivial format. Now i have very unpleasant debugging

     
  • Guido Leenders

    Guido Leenders - 2021-04-04

    Our code connects to a cloud platform called Twinfield, which wraps zlib stream output in Base64.

     
  • DAG

    DAG - 2021-05-13

    The latest .NET compression (apps developed with Microsoft Visual Studio) is zlib, see System.IO.Compression.DeflateStream

    7zip cannot open these, it's quite problematic.

     

    Last edit: DAG 2021-05-13
  • tlf30

    tlf30 - 2023-07-27

    Working with EDS files, they are single ZLIB files with multiple file streams in them. 7zip only shows the first file entry as containing all the streams, which leaves the single file corrupt, and prevents access to the other files. The EDS file format is used in almost all industrial control applications.

    I have attached an example file.

     
  • TheDeveloo

    TheDeveloo - 2023-10-01

    ZLIB is also used in 3d printing by Ender to provide firmware.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.