Meshbeyn / Projects

namespace NTFSExtensions

public static class Compression

GetLengthCompressed

Returns occupied size for compressed stream.

Signatures

Parameters

this FileInfo File
A FileInfo object as a reference to file. You may call this method directly from this object, because this is an extension method.
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.
String FilePath
Full or relative path to stream.

Returns

If the stream is compressed or sparse, function returns size of occupied clusters. If stream is saved as plain data, logical size is returned.

Remarks

This function needs path to stream. You don't need to open the file.

Example

Example: working with compressed streams

Example: working with sparse streams

See also