View file in zipped files - don't decompress all

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
samot
Junior Member
Junior Member
Posts: 56
Joined: 2003-02-21, 11:53 UTC
Location: Koblenz, Germany
Contact:

View file in zipped files - don't decompress all

Post 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)
User avatar
Usher
Power Member
Power Member
Posts: 1675
Joined: 2011-03-11, 10:11 UTC

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

Post by *Usher »

Have you tried to use gz compression instead?
Andrzej P. Wozniak
Polish subforum moderator
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48005
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

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

Post 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.
Author of Total Commander
https://www.ghisler.com
User avatar
Usher
Power Member
Power Member
Posts: 1675
Joined: 2011-03-11, 10:11 UTC

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

Post by *Usher »

2ghisler(Author)
Thanks for the explanation. Plugin is the key.
Andrzej P. Wozniak
Polish subforum moderator
Post Reply