ZTree.com  | ZEN  | About...  

 Index   Back

I meant "is getting compressed size on disk quick?"   [Wish]

By: Peter Shute       
Date: Jan 23,2019 at 22:13
In Response to: Is getting size on disk quick? (Nuno)

> This thread started, actually, as a "Compressed Size", not really a
> "Size on disk", like Windows explorer shows.

Yes, I forgot. We have been referring to "size on disk" meaning compressed size.

> For compressed size, there is an API "GetCompressedFileSize", which
> gives exactly that.
> SizeOnDisk seems to have no direct public API to get it.

I'm not sure I'd be that interested in the size on disk, meaning the number of blocks used x block size. We should perhaps start referring to it as the compressed size on disk.

> I didn't tested it, but I would suppose that calling one extra API
> (GetCompressedFileSize), for each file will incur some time (and will
> occupy some memory space), but maybe It won't incur much in I/O
> overhead, because of read-cache.

We need to know how much extra time it takes.

> Also, ZTree already knows if files are compressed (based on the 'C'
> attribute), so it could just (and only) call "GetCompressedFileSize",
> which is documented as returning the same as "GetFileSize" for files
> that are not compressed.

Agreed. Some disks will have many or all files compressed, so we need to assume that could be the case.

Thread locked

Messages in this Thread

95,067 Postings in 11,984 Threads, 350 registered users, 99 users online (0 registered, 99 guests)
Index | Admin contact |   Forum Time: Aug 8, 2020 - 10:57 pm EDT  |  Hits:32,970,246  (25,076 Today )
RSS Feed