简体   繁体   English

需要在线工具将 GZip 压缩文本转换为 ASCII(可读)文本

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

I am trying to view data in a Redis database.我正在尝试查看 Redis 数据库中的数据。 It is compressed data using Lettuce 6.1.1 version compression library.它是使用 Lettuce 6.1.1 版本压缩库压缩的数据。 It uses a GZIP compression type.它使用 GZIP 压缩类型。 I have tried several online tools to convert the GZIP text to a readable ASCII format.我尝试了几种在线工具将 GZIP 文本转换为可读的 ASCII 格式。 The tools fail because it does not recognize the GZIP text as GZIP data.这些工具失败是因为它无法将 GZIP 文本识别为 GZIP 数据。 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?谁能指出我可以将这些数据解压缩为可读的 ascii 文本的工具?

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 \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这应该转换为一个数字: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 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.这应该是 7 个服务区号码的列表。 Not sure of the order but the values should be:不确定顺序,但值应该是:

  1. 302090 302090
  2. 302092 302092
  3. 302097 302097
  4. 302094 302094
  5. 302096 302096
  6. 302089 302089
  7. 301194 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.我尝试使用这个在线工具: https://codebeautify.org/gzip-decompress-online翻译 window 中没有出现翻译,也没有显示错误。

I also tried a this website: https://www.multiutil.com/gzip-to-text-decompress/我也试过这个网站: 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 到 7 没有任何问题。它们都是有效的 gzip 流,可以解压缩为:

  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.虽然 gzip stream 中的 deflate 压缩数据有效,但其后的 CRC 无效。 The uncompressed length after that is incorrect as well.之后的未压缩长度也是不正确的。

The online tools you point to are expecting Base64 encoded data.您指向的在线工具需要 Base64 编码数据。 Not the partial hex encodings you are trying there.不是您在那里尝试的部分十六进制编码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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