python - Reading gzip file that is currently being written to -
my program lot of file processing, , files large prefer write them gzip. 1 challenge need read files being written. not problem without gzip compression, when compression on, reading complains failed crc, presume might have compression info not being flushed when writing. there way use gzip python such that, when write , flush file (but not close file), can read well?
i think flushing data file (compressed) writes data file, headers written on close()
, need close file first, , after can open , read data need. if need write large data ammounts, can try use database, postgresql or mysql can specify table compression (archive, compressed), , able insert data table, , read it, database software rest (compression, decompression on inserts, selects).
Comments
Post a Comment