Page 1 of 1

View file in zipped files - don't decompress all

Posted: 2021-09-09, 13:01 UTC
by samot
  • 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)

Re: View file in zipped files - don't decompress all

Posted: 2022-07-02, 07:42 UTC
by Usher
Have you tried to use gz compression instead?

Re: View file in zipped files - don't decompress all

Posted: 2022-07-03, 07:54 UTC
by ghisler(Author)
Sorry, gz compression wouldn't help here, TC would have to decompress the entire file too. Why? While it would theoretically be possible to only unpack a part of the file for the internal text/binary viewer, it wouldn't work with plugins. Also when you jump to the end of the file, the entire file needs to be unpacked anyway because the data at the end depends on the data at the beginning.

Re: View file in zipped files - don't decompress all

Posted: 2022-07-03, 10:26 UTC
by Usher
2ghisler(Author)
Thanks for the explanation. Plugin is the key.