Difference between revisions of "Unit NTFSUtils"
Line 48: | Line 48: | ||
! '''Note''' | ! '''Note''' | ||
| None documented | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | |||
+ | '''NTFS compression functions''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function NTFSGetUnitUsed(ABuffer:Pointer; ASize,AShift:LongWord):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the actual size consumed by the compressed data in the unit</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Buffer''' | ||
+ | | Buffer must always be a full compression unit in size | ||
+ | |- | ||
+ | ! '''Size''' | ||
+ | | Size is the size of a cluster | ||
+ | |- | ||
+ | ! '''Shift''' | ||
+ | | Shift is the cluster to compression unit shift count (Usually 4) | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | Caller must have confirmed that the unit is compressed | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function NTFSCompressUnit(ASource,ADest:Pointer; ASize,AShift,AStart,ACount,ATotal:LongWord):Boolean;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Compress a unit of data from source to dest buffers</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Source''' | ||
+ | | Source buffer contains the uncompressed data on entry | ||
+ | Source buffer must always be a full compression unit in size | ||
+ | |- | ||
+ | ! '''Dest''' | ||
+ | | Dest buffer will contain the compressed data on exit | ||
+ | Dest buffer must always be a full compression unit in size | ||
+ | |- | ||
+ | ! '''Size''' | ||
+ | | Size is the size of a cluster | ||
+ | |- | ||
+ | ! '''Shift''' | ||
+ | | Shift is the cluster to compression unit shift count (Usually 4) | ||
+ | |- | ||
+ | ! '''Start''' | ||
+ | | Start is the starting cluster for the compression (zero to start at the first cluster) | ||
+ | |- | ||
+ | ! '''Count''' | ||
+ | | Count is the number of clusters to be compressed | ||
+ | |- | ||
+ | ! '''Total''' | ||
+ | | Total is the number of bytes to be compressed (from start) (may be less than a full unit) | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | Compress block will detect an uncompressable block as the final length after compression will be greater than 4096 in length. If compress block reaches the end of the dest buffer then it | ||
+ | will fail the compress block and compress unit and the whole unit will be considered as uncompressable. If the data available for the block is less then 4096 then it may grow after compression but will not be marked as uncompressed unless it exceeds 4096 bytes. | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function NTFSDecompressUnit(ASource,ADest:Pointer; ASize,AShift,AStart,ACount,ATotal:LongWord):Boolean;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Decompress a unit (or partial unit) of data from source to dest buffers</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Source''' | ||
+ | | Source buffer contains the compressed data on entry | ||
+ | Source buffer must always be a full compression unit in size | ||
+ | |- | ||
+ | ! '''Dest''' | ||
+ | | Dest buffer will contain the uncompressed data on exit | ||
+ | Dest buffer must always be a full compression unit in size | ||
+ | |- | ||
+ | ! '''Size''' | ||
+ | | Size is the size of a cluster | ||
+ | |- | ||
+ | ! '''Shift''' | ||
+ | | Shift is the cluster to compression unit shift count (Usually 4) | ||
+ | |- | ||
+ | ! '''Start''' | ||
+ | | Start is the starting cluster for the decompression (zero to start at the first cluster) | ||
+ | |- | ||
+ | ! '''Count''' | ||
+ | | Count is the number of blocks to be decompressed | ||
+ | |- | ||
+ | ! '''Total''' | ||
+ | | Total is the number of bytes to be decompressed (from start) (may be less than a full unit) | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | Caller must have confirmed that the unit is compressed | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function NTFSGetBlockShift(ASize:LongWord):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the shift count for cluster to 4k block conversion</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Size''' | ||
+ | | Size is the size of a cluster | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function NTFSCompressBlock(ASource,ADest:Pointer; ASize,ATotal:LongWord):Boolean;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Compress a 4k block of data from source to dest buffers</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Source''' | ||
+ | | Source buffer contains the uncompressed data on entry | ||
+ | Source buffer must have at least one 4k block available | ||
+ | |- | ||
+ | ! '''Dest''' | ||
+ | | Dest buffer will contain the compressed data on exit | ||
+ | |- | ||
+ | ! '''Size''' | ||
+ | | Size is the available bytes in the dest buffer | ||
+ | |- | ||
+ | ! '''Total''' | ||
+ | | Total is the number of bytes to be compressed (may be less than a full block) | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | Compress block will detect an uncompressable block as the final length after compression will be greater than 4096 in length. If compress block reaches the end of the dest buffer then it | ||
+ | will fail the compress block and compress unit and the whole unit will be considered as uncompressable. If the data available for the block is less then 4096 then it may grow after compression but will not be marked as uncompressed unless it exceeds 4096 bytes. | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function NTFSDecompressBlock(ASource,ADest:Pointer; ASize:LongWord):Boolean;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Decompress a 4k block of data from source to dest buffers</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Source''' | ||
+ | | Source buffer contains the compressed data on entry | ||
+ | |- | ||
+ | ! '''Dest''' | ||
+ | | Dest buffer will contain the uncompressed data on exit | ||
+ | Dest buffer must have at least one 4k block available | ||
+ | |- | ||
+ | ! '''Size''' | ||
+ | | Size is the available bytes in the source buffer | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function NTFSGetTagShiftMask(AOffset:LongWord; var AMask,AShift:Word):Boolean;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the Mask bits and Shift count for Tag encode and decode based on the offset</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Offset''' | ||
+ | | Offset is the offset into the uncompressed data at the point of the tag | ||
|- | |- | ||
|} | |} |
Revision as of 02:59, 20 October 2016
Return to Unit Reference
Description
To be documented
Constants
To be documented
Type definitions
To be documented
Public variables
To be documented
Function declarations
NTFS support functions
function NTFSInitUpCase:Boolean;
Note | None documented |
---|
function NTFSGetUpCase:PNTFSUpCaseData;
Note | None documented |
---|
NTFS compression functions
function NTFSGetUnitUsed(ABuffer:Pointer; ASize,AShift:LongWord):LongWord;
Buffer | Buffer must always be a full compression unit in size |
---|---|
Size | Size is the size of a cluster |
Shift | Shift is the cluster to compression unit shift count (Usually 4) |
Note | Caller must have confirmed that the unit is compressed |
function NTFSCompressUnit(ASource,ADest:Pointer; ASize,AShift,AStart,ACount,ATotal:LongWord):Boolean;
Source | Source buffer contains the uncompressed data on entry
Source buffer must always be a full compression unit in size |
---|---|
Dest | Dest buffer will contain the compressed data on exit
Dest buffer must always be a full compression unit in size |
Size | Size is the size of a cluster |
Shift | Shift is the cluster to compression unit shift count (Usually 4) |
Start | Start is the starting cluster for the compression (zero to start at the first cluster) |
Count | Count is the number of clusters to be compressed |
Total | Total is the number of bytes to be compressed (from start) (may be less than a full unit) |
Note | Compress block will detect an uncompressable block as the final length after compression will be greater than 4096 in length. If compress block reaches the end of the dest buffer then it
will fail the compress block and compress unit and the whole unit will be considered as uncompressable. If the data available for the block is less then 4096 then it may grow after compression but will not be marked as uncompressed unless it exceeds 4096 bytes. |
function NTFSDecompressUnit(ASource,ADest:Pointer; ASize,AShift,AStart,ACount,ATotal:LongWord):Boolean;
Source | Source buffer contains the compressed data on entry
Source buffer must always be a full compression unit in size |
---|---|
Dest | Dest buffer will contain the uncompressed data on exit
Dest buffer must always be a full compression unit in size |
Size | Size is the size of a cluster |
Shift | Shift is the cluster to compression unit shift count (Usually 4) |
Start | Start is the starting cluster for the decompression (zero to start at the first cluster) |
Count | Count is the number of blocks to be decompressed |
Total | Total is the number of bytes to be decompressed (from start) (may be less than a full unit) |
Note | Caller must have confirmed that the unit is compressed |
function NTFSGetBlockShift(ASize:LongWord):LongWord;
Size | Size is the size of a cluster |
---|
function NTFSCompressBlock(ASource,ADest:Pointer; ASize,ATotal:LongWord):Boolean;
Source | Source buffer contains the uncompressed data on entry
Source buffer must have at least one 4k block available |
---|---|
Dest | Dest buffer will contain the compressed data on exit |
Size | Size is the available bytes in the dest buffer |
Total | Total is the number of bytes to be compressed (may be less than a full block) |
Note | Compress block will detect an uncompressable block as the final length after compression will be greater than 4096 in length. If compress block reaches the end of the dest buffer then it
will fail the compress block and compress unit and the whole unit will be considered as uncompressable. If the data available for the block is less then 4096 then it may grow after compression but will not be marked as uncompressed unless it exceeds 4096 bytes. |
function NTFSDecompressBlock(ASource,ADest:Pointer; ASize:LongWord):Boolean;
Source | Source buffer contains the compressed data on entry |
---|---|
Dest | Dest buffer will contain the uncompressed data on exit
Dest buffer must have at least one 4k block available |
Size | Size is the available bytes in the source buffer |
function NTFSGetTagShiftMask(AOffset:LongWord; var AMask,AShift:Word):Boolean;
Offset | Offset is the offset into the uncompressed data at the point of the tag |
---|
Return to Unit Reference