简体   繁体   中英

Need Online Tool to Convert GZip compression text to ASCII (Readable) text

I am trying to view data in a Redis database. It is compressed data using Lettuce 6.1.1 version compression library. It uses a GZIP compression type. I have tried several online tools to convert the GZIP text to a readable ASCII format. The tools fail because it does not recognize the GZIP text as GZIP data. Maybe it has something to do with the compression algorithm lettuce uses to compress the data.

Can anyone point me to a tool where I can decompress this data to readable ascii text?

Here is an example of the compressed data:

\x1F\x8B\x08\x00\x00\x00\x00\x00\x00\x00\xABV N- \xCBLNu,JM\xF4+\xCDMJ-R\xB2R2604\xB44Q\xAA\x05\x00\x190\x9B\xD1\x1E\x00\x00\x00

This should translate to a number: 301194

Here is a second example:

1.\x1F\x8B\x08\x00\x00\x00\x00\x00\x00\x003602\xB04\x01\x00\x93\xC0t\xC3\x06\x00\x00\x00 2.\x1F\x8B\x08\x00\x00\x00\x00\x00\x00\x003602\xB0\xB0\x04\x00o\x8D\xDE\xA4\x06\x00\x00\x00 3.\x1F\x8B\x08\x00\x00\x00\x00\x00\x00\x003602\xB04\x07\x00)\x91}Z\x06\x00\x00\x00 4.\x1F\x8B\x08\x00\x00\x00\x00\x00\x00\x003602\xB04\x03\x00\xBF\xA1z-\x06\x00\x00\x00 5.\x1F\x8B\x08\x00\x00\x00\x00\x00\x00\x003602\xB04\x00\x00\x8A\x04\x19\xC4\x06\x00\x00\x00 6.\x1F\x8B\x08\x00\x00\x00\x00\x00\x00\x003602\xB04\x02\x00\xA6e\x17*\x06\x00\x00\x00 7.\x1F\x8B\x08\x00\x00\x00\x00\x00\x00\x003604\xB44\x01\x00J\x05\x03\xD0\x06\x00\x00\x00

This should be a list of 7 service area numbers. Not sure of the order but the values should be:

  1. 302090
  2. 302092
  3. 302097
  4. 302094
  5. 302096
  6. 302089
  7. 301194

I tried using this online tool: https://codebeautify.org/gzip-decompress-online There is no translation that appears in the translation window and no error is shown.

I also tried a this website: https://www.multiutil.com/gzip-to-text-decompress/

I get the error: Invalid compression text在此处输入图像描述

There is nothing wrong with your examples 1 through 7. They are all valid gzip streams that decompress to:

  1. 302094
  2. 302089
  3. 302097
  4. 302096
  5. 302090
  6. 302092
  7. 301194

Your first example in your question however has an error in the integtity check at the end. It decodes to:

  1. {#eviceAreaNumber":"301194"}

While the deflate compressed data in the gzip stream is valid, the CRC that follows it is not. The uncompressed length after that is incorrect as well.

The online tools you point to are expecting Base64 encoded data. Not the partial hex encodings you are trying there.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM