0

I have a txt file in which i have multiple ASCII values.Like the below one which is the example :

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  .

After some time i using this command to create a .gz file :

gzip $filepath

After the file is getting zipped ASCII values are getting converted in actual word like :

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 

So i want to know is there any feature of gzip command that is doing this change by default.

4
  • Did you create the file and edit it with different programs?
    – ilkkachu
    Oct 18 '16 at 12:41
  • this file was created and zipped from same user
    – Developer
    Oct 18 '16 at 13:39
  • how did you (g)unzip the file? Oct 18 '16 at 14:08
  • 1
    Note: gzip is a lossless compression, so a compression and a decompression should give the same content as the original file.There can be bugs, but because it is often used to compress binary files, I don't think a such short case could trigger some hidden bug. Oct 18 '16 at 14:10
2

Most likely gzip does not change the file content, unless something is seriously broken. Probably your programs to watch the compressed and uncompressed files do something different.

To compare the content you can use md5sum

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.