I am working with .gz extension file where I am required to delete specific pattern from the file with least processing time and not altering the file at all.
Delete specific line(pattern) from .gz file using python for large file size
880 views Asked by Shashank Anand At
1
Have you tried using gzip.GzipFile? Arguments are similar to
open
.Example of reading a lines from a file and writing to another files if a certain condition does not match:
Note that the input and output file must be different.