ZTree.com  | ZEN  | About...  

 Index   Back

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

By: Peter Shute       
Date: Jan 24,2019 at 03: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.

1,137 views      
Thread locked
 

Messages in this Thread

 
96,631 Postings in 12,230 Threads, 350 registered users, 71 users online (0 registered, 71 guests)
Index | Admin contact |   Forum Time: Mar 19, 2024 - 5:56 am UTC  |  Hits:62,009,534  (6,815 Today )
RSS Feed