Meshbeyn / Projects

namespace NTFSExtensions

public static class Compression


Returns an enumeration of unallocated regions in a stream.



this FileStream File
A FileStream object as a reference to opened stream. You may call this method directly from this object, because this is an extension method.


If the stream is compressed or sparse, function calculates and returns an enumeration of unallocated regions. If stream is saved as plain data, no unallocated regions may exist.


Scans a file or alternate stream looking for ranges that contain unallocated clusters. Only compressed or sparse files can have unallocated ranges known to the operating system. For other files, the enumeration is always empty.


Example for working with sparse streams

See also