Class SBCommons

Some useful static methods for the backup system.

class SBCommons ;

Methods

NameDescription
byteArrayToByte (Bytes) This is as stupid as the other one.
byteArrayToInt (Bytes) Converts back an ubyte[] array to a uint value.
byteArrayToLong (Bytes) Converts back an ubyte[] array to a ulong value.
byteArrayToWord (Bytes) Converts back an ubyte[] array to a ushort value.
byteToByteArray (Number) I know that this is completely stupid, but, it's for readability's sake.
compressArray (Array) Compresses an array, deleting numerical series from the array, making it shorter.
decompressArray (Array) Decompress a previously compressed array into a normal array.
getArray (Handle) Reads a compressed array from the supplied file handle.
getNumber (Handle) Reads a previously compressed ulong value from the supplied file handle.
getString (Handle) Reads a null-terminated string from the supplied file handle.
intToByteArray (Number) Converts a uint to a ubyte array.
longToByteArray (Number) Converts a ulong to a ubyte array.
pathWalker (Path) Walks over a directory, returning an array of every element found on that directory recursively.
putArray (Handle, Array) Compresses and writes an array into the supplied file handle.
putNumber (Handle, Number) Compresses an ulong value and writes it on the supplied file handle.
putString (Handle, Text) Puts a null-terminated string into the supplied file handle.
wordToByteArray (Number) Converts a ushort to a ubyte array.

Note

These methods are not imported publicly by default.