View file in zipped files - don't decompress all
Posted: 2021-09-09, 13:01 UTC
- I have a big - lets say >200 MB - Zip file on a (slow) remote server
- it contains only a single much bigger csv file, compression ratio for text files is usually between 1:5 to 1:10
- I press F3 to view this big (compressed) CSV
- if the CSV would have been already decompressed, TC Viewer would only read the first few KB of the file, which makes him so fast to view even the biggest files
- but since the CSV is still zipped, it unzipps the whole 1-2 GB file (copying 200 MB zip over my slow connection and unzipping the 1 GB file into my TEMP folder which has hopefully enough space
- it would be much better / faster, if it would either pause the whole unzip process after e.g. 1 MB and show me the first lines almost instant.
- if I decide to scroll deeper or even to the end of the file, it could continue the unzipping process
- I'm aware, that the usual compress routine does not have something as a pause option, but maybe it could be controlled by pausing the ReadFileStreamOfZipFileFromSource-process which simply stops more blocks to unzip
- an alternative would be to let the unzip continue in the background but shows me the CSV immediately after it unzipped the first few KB instead of letting me wait until it decompressed the whole file (often I just want to check the the header and some example lines)