gzip 是否删除 ASCII 值

gzip 是否删除 ASCII 值

我有一个 txt 文件,其中有多个 ASCII 值。如下例所示:

including complimentary high-speed internet access, in-room hospitality center with microwave, refrigerator, coffeemaker, two dual line phones with voicemail and data ports, large work desk, ergonomic chair, On Our location in **Boston’s** artfully revitalized  .

一段时间后,我使用此命令创建一个 .gz 文件:

gzip $filepath

文件被压缩后,ASCII 值将被转换为实际的单词,例如:

including complimentary high-speed internet access, in-room hospitality center with microwave, refrigerator, coffeemaker, two dual line phones with voicemail and data ports, large work desk, ergonomic chair, On Our location in Boston® artfully revitalized 

所以我想知道 gzip 命令是否有任何功能默认执行此更改。

答案1

很可能gzip不会更改文件内容,除非某些内容严重损坏。也许你的程序用来观察压缩和未压缩文件会做一些不同的事情。

要比较您可以使用的内容md5sum

$ md5sum  file
d41d8cd98f00b204e9800998ecf8427e  file
$ gzip  file
$ zcat file.gz | md5sum
d41d8cd98f00b204e9800998ecf8427e  -

相关内容