Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #42423 |

    Hi, I have inherited an application which reads an image turns into a byte array then compresses it using xceed compression library and stores the byte array into Sql database.  I need to read that image data from Database abd restore that into an image, but the problem is i have no clue of how it was compressed.

    I m just putting some binary data below so that if someone can recognise something familiar like its format or anything can please help me

    Binary in DB for all records starts with — 0x505 

     Any help will be really appreciated

     

    Imported from legacy forums. Posted by Amit (had 1226 views)

    Xceed Support
    Member
    Post count: 5658

    Hi Amit,

     

    If the data was compressed using the XceedCompression object, then the header has the following format:

    struct SCompressHeader
    {
      BYTE fcEncrypted  : 1;    // Indicates if the compressed data is encrypted
      BYTE fcReserved  : 3;    // Reserved for future use
      BYTE ecCompMethod : 4;    // Compression method: v4.5 –> 0=deflate, 1=store, 2=BWT
                                //                    v5.0 +-> 3=deflate64
                                //                    v6.1 +-> 4=BZip2
                                //                    v6.5 +-> 5=LZMA

      // Followed by optional encryption header
    };

    There will be a 4 byte footer that contains an Adler32 checksum of the data.

    So a value of 5 for the header would mean that the data is uncompressed and encrypted, which makes sense for images. The encryption is Zip’s ZCrypt encryption.

    There’s no way we can tell you what the password is though.

    With the proper password, you should be able to use the XceedCompression class of the Xceed Zip Compression Library to decompress the data.

    Documentation:
    http://doc.xceedsoft.com/products/XceedZip/Overview_of_the_Xceed_Compression_control.html

    Imported from legacy forums. Posted by Mohamed [Xceed] (had 448 views)

    User (Old forums)
    Member
    Post count: 23064

    Hi,

     

    I have attached a file where i have copied the complete binay. Pleae have a look at it and advise if you spot something

     

    http://xceed.com/CS/forums/post/27381.aspx

    Imported from legacy forums. Posted by Amit (had 1710 views)

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.