module Ole

Overview

see https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-cfb/28488197-8193-49d7-84d8-dfd692418ccd

Defined in:

constants.cr
convert_datetime.cr
convert_string.cr
directory.cr
direntry.cr
dump.cr
header.cr
helper.cr
ole.cr
readers.cr

Constant Summary

DIFSECT = 4294967292_i64
ENDOFCHAIN = 4294967294_i64
FATSECT = 4294967293_i64
FREESECT = 4294967295_i64
MAXREGSECT = 4294967290_i64

Added constants for Sector ID's

MAXREGSID = 4294967290_i64

Added constants for Directory Entry ID's

MINIMAL_OLEFILE_SIZE = 1536

Minimal size of an empty OLE file, with 512-bytes sectors = 1536 bytes

NOSTREAM = 4294967295_i64
S_DIRECTORY = "Directory"
S_ENDOFCHAIN = "End of chain"
S_FATSECTOR = "Fat sector"
S_FREESECTOR = "Free sector"
S_HEADER = "Header"
S_MINIFATSECTOR = "Mini Fat sector"
TEN_MILLION = 10000000
UNKNOWN_SIZE = 2147483647
YEAR_1601 = 1601

Class Method Summary

Class Method Detail

def self.be_u16(bytes : Bytes) : UInt16 #

[View source]
def self.be_u32(bytes : Bytes) : UInt32 #

[View source]
def self.be_u64(bytes : Bytes) : UInt64 #

[View source]
def self.be_u8(bytes : Bytes) : UInt8 #

Big Endian helpers


[View source]
def self.endian_u16(bytes : Bytes, byte_order : Ole::ByteOrder) #

[View source]
def self.endian_u32(bytes : Bytes, byte_order : Ole::ByteOrder) #

[View source]
def self.endian_u64(bytes : Bytes, byte_order : Ole::ByteOrder) #

[View source]
def self.endian_u8(bytes : Bytes, byte_order : Ole::ByteOrder) #

[View source]
def self.le_datetime(bytes : Bytes) : Time #

[View source]
def self.le_string(bytes : Bytes, len : Int32) : String #

[View source]
def self.le_u16(bytes : Bytes) : UInt16 #

[View source]
def self.le_u32(bytes : Bytes) : UInt32 #

[View source]
def self.le_u64(bytes : Bytes) : UInt64 #

[View source]
def self.le_u8(bytes : Bytes) : UInt8 #

Little Endian helpers


[View source]
def self.to_hex(bytes : Bytes, byte_order : ByteOrder = ByteOrder::None, prefix : String = "0x", leading_zero : Bool = false) #

[View source]