SharpDevelop Community

Get your problems solved!
Welcome to SharpDevelop Community Sign in | Join | Help
in Search

How to extract 78DA algorithm?

Last post 08-02-2009 11:49 PM by megazhuk. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 09-16-2005 6:08 AM

    • dvl555
    • Not Ranked
    • Joined on 09-16-2005
    • Posts 3

    How to extract 78DA algorithm?

    Zip algorithms:
    compression extreme: 78DA
    compression standard: 789C
    compression faible: 785E

    Hi, I am trying to extract a block of data from MemoryStream. When compression algorithm is set to 789C(standard) I have no problem extracting it, but when I try to inflate 'ICSharpCode.SharpZipLib.Zip.Compression.Streams.InflaterInputStream' with the data that was compressed using 78DA(extreme) algorithm, I get an empty buffer.

    Is there a way to extract 78DA compressed data with SharpZipLib?
  • 09-16-2005 11:36 AM In reply to

    Re: How to extract 78DA algorithm?

    Hi,

    It must late in the day - I dont understand your terminology 78Da, 789c, 785E?  What are you compressing this data with?

    Cheers, -jr-

  • 09-19-2005 8:10 AM In reply to

    • dvl555
    • Not Ranked
    • Joined on 09-16-2005
    • Posts 3

    Re: How to extract 78DA algorithm?

    Hi,

    I have a block of compressed data. The first two bytes are hex codes 78 and DA. The data come from a poorly documented application that in the past has used ZLIB compression where the first two bytes are 78 9C. I can decode ZLIB correctly but when I try to apply the same algorithm to the data starting with 78 DA, it fails. The application may have used a completely different compression standard for that block of data.

    I found on some other forum information that seem to indicate that both 78 9C and 78DA are ZLIB compressed but 78 DA uses 'strong' (extreme) compression and 78 9C uses 'normal' (standard) compression.

    In brief, I receive compressed data starting with bytes 78 and DA and i'm trying to decompress it. When I use the ICSharpCode.SharpZipLib.Zip.Compression.Streams.InflaterInputStream  class, the returned buffer is null.

    Code:

    MemoryStream mem_stream = new MemoryStream(source,(int)offset,(int)len_in);

    ICSharpCode.SharpZipLib.Zip.Compression.Streams.InflaterInputStream input_stream =

    new ICSharpCode.SharpZipLib.Zip.Compression.Streams.InflaterInputStream(mem_stream);


     

  • 09-20-2005 3:15 AM In reply to

    Re: How to extract 78DA algorithm?

    Hi,

    78 9C is indeed zlib with maximum compression with no preset dictionary, while 78 DA is default compression with a preset dictionary.

    Its not clear were the problem is currently.  There is no exception or other indication of whats going wrong?

    Cheers,

    -jr-

     

     

  • 10-04-2005 6:01 AM In reply to

    • dvl555
    • Not Ranked
    • Joined on 09-16-2005
    • Posts 3

    Re: How to extract 78DA algorithm?

    Hi,
        I apologise for inconvinience, its my mistake. No problem with SharpZipLib. It reads both algorithms correctly. It was a problem in one of our libraries that didn't read the input stream correctly. Thank you for your response.

    P.S.
        If possible, remove this thread, because there is no problem.

  • 06-17-2009 9:48 AM In reply to

    • trung
    • Not Ranked
    • Joined on 06-17-2009
    • Posts 2

    Re: How to extract 78DA algorithm?

    Hi,

    I am a student of first year IT. I  have a block of compressed data. The first two bytes are hex codes 78 and DA.

    I want decompress this block data. Can you guide me ?. I can only use c#.

    Best regards,

    Trung.

  • 06-17-2009 9:57 AM In reply to

    • trung
    • Not Ranked
    • Joined on 06-17-2009
    • Posts 2

    Re: How to extract 78DA algorithm?

     Hi,

    I  have a block of compressed data. The first two bytes are hex codes 78 and DA.

    Would You please give me the source code decompress this block of data.

    Thank you before hand.

    Trung.

  • 08-02-2009 11:49 PM In reply to

    Re: How to extract 78DA algorithm?

    Hi.

    you can use this library http://www.componentace.com/zlib_.NET.htm

    This is freeware C# implementation of ZLIB library (http://zlib.net). In archive you also can find examples, that can help you compress/decompress your data.

    78DA - data compressed by "zlib.zlibConst.Z_BEST_COMPRESSION" (or int=9) marker.

    Filed under:
Page 1 of 1 (8 items)
Powered by Community Server (Commercial Edition), by Telligent Systems
Don't contact us via this (fleischfalle@alphasierrapapa.com) email address.