Page 1 of 1

Wrong displayed file size in bz2 archive

Posted: 18 May 2006, 17:24
by crystalidea
The size of the file inside this archive is not 0!
http://prdownloads.sf.net/mingw/MSYS-1. ... 2?download

Re: BUG: bz2

Posted: 18 May 2006, 18:16
by Tomas Kopal
XPiS wrote:The size of the file inside this archive is not 0!
http://prdownloads.sf.net/mingw/MSYS-1. ... 2?download
Well, trouble with bzip2 archives is that they do not store the uncompressed size of the file in the archive. So we basically have two options, either display zero (that's what we do right now) or decompress the whole archive just to determine it's size, which could take ages for large archives.
We plan to "improve" this situation by not displaying the size at all for such archives, but it's low priority at the moment.

Posted: 27 May 2006, 21:20
by -=Majkl=-
could it work in this way:

- first, archive is opened, zero sizes are shown
- while browsing the archive, the sizes of files are being showed - this should be proccessed in other (low priority) thread

Posted: 29 May 2006, 08:33
by Tomas Kopal
-=Majkl=- wrote:could it work in this way:

- first, archive is opened, zero sizes are shown
- while browsing the archive, the sizes of files are being showed - this should be proccessed in other (low priority) thread
Well, bz2 archive can contain only one file, so "browsing" is probably not the best description :-).
I was considering the option to uncompress the archive in a separate thread as well, but I think the complexity of such workaround is not worth the benefit. Also, the interface Salamander offers to archiver plugins does not allow to alter the information "later", after initial listing was done, so the work to implement this would be really considerable (read: not worth it).

Posted: 29 May 2006, 23:13
by SvA
Tomas Kopal wrote:Also, the interface Salamander offers to archiver plugins does not allow to alter the information "later", after initial listing was done, so the work to implement this would be really considerable (read: not worth it).
Do you distiguish between archiver plugins and file system plugins? If you don't, you should ernestly consider adding an update feature (push update or a callback) to the interface. Many possible plugins could benefit from it.

Posted: 30 May 2006, 10:19
by Tomas Kopal
SvA wrote:Do you distiguish between archiver plugins and file system plugins?
Yes, we do. Writing filesystem plugins is considerably more complex (but the interface is also more powerful) than archiver plugins, so they are used only if the benefit is worth it.