class Ole::Header
- Ole::Header
- Reference
- Object
Defined in:
header.crConstructors
Instance Method Summary
- #byte_order : Ole::ByteOrder
- #byte_order=(byte_order : Ole::ByteOrder)
- #clsid : String
- #clsid=(clsid : String)
- #data : Bytes
- #data=(data : Bytes)
- #determine_byteorder : Ole::ByteOrder
- #difat : Array(UInt32)
- #difat=(difat : Array(UInt32))
- #dump
- #error : String
- #error=(error : String)
-
#errors : Array(String)
size # start offset (decimal) property magic : Bytes = Bytes.new(8) # 8 bytes 0 property clsid : Bytes = Bytes.new(16) # 16 bytes 8 property minor_version : Bytes = Bytes.new(2) # 2 bytes 24 property major_version : Bytes = Bytes.new(2) # 2 bytes 26 property byte_order : Bytes = Bytes.new(2) # 2 bytes 28 property sector_shift : Bytes = Bytes.new(2) # 2 bytes 30 property mini_sector_shift : Bytes = Bytes.new(2) # 2 bytes 32 property reserved : Bytes = Bytes.new(6) # 6 bytes 34 property nr_dir_sectors : Bytes = Bytes.new(4) # 4 bytes 40 property nr_fat_sectors : Bytes = Bytes.new(4) # 4 bytes 44 property first_dir_sector : Bytes = Bytes.new(4) # 4 bytes 48 property trans_sig_number : Bytes = Bytes.new(4) # 4 bytes 52 property mini_stream_cutoff : Bytes = Bytes.new(4) # 4 bytes 56 property first_minifat_sector : Bytes = Bytes.new(4) # 4 bytes 60 property nr_mini_fat_sectors : Bytes = Bytes.new(4) # 4 bytes 64 property first_difat_loc : Bytes = Bytes.new(4) # 4 bytes 68 property nr_dfat_sectors : Bytes = Bytes.new(4) # 4 bytes 72 property difat : Bytes = Bytes.new(436) # 436 bytes from 76, first 109 = (436/4) FAT sector locations
-
#errors=(errors : Array(String))
size # start offset (decimal) property magic : Bytes = Bytes.new(8) # 8 bytes 0 property clsid : Bytes = Bytes.new(16) # 16 bytes 8 property minor_version : Bytes = Bytes.new(2) # 2 bytes 24 property major_version : Bytes = Bytes.new(2) # 2 bytes 26 property byte_order : Bytes = Bytes.new(2) # 2 bytes 28 property sector_shift : Bytes = Bytes.new(2) # 2 bytes 30 property mini_sector_shift : Bytes = Bytes.new(2) # 2 bytes 32 property reserved : Bytes = Bytes.new(6) # 6 bytes 34 property nr_dir_sectors : Bytes = Bytes.new(4) # 4 bytes 40 property nr_fat_sectors : Bytes = Bytes.new(4) # 4 bytes 44 property first_dir_sector : Bytes = Bytes.new(4) # 4 bytes 48 property trans_sig_number : Bytes = Bytes.new(4) # 4 bytes 52 property mini_stream_cutoff : Bytes = Bytes.new(4) # 4 bytes 56 property first_minifat_sector : Bytes = Bytes.new(4) # 4 bytes 60 property nr_mini_fat_sectors : Bytes = Bytes.new(4) # 4 bytes 64 property first_difat_loc : Bytes = Bytes.new(4) # 4 bytes 68 property nr_dfat_sectors : Bytes = Bytes.new(4) # 4 bytes 72 property difat : Bytes = Bytes.new(436) # 436 bytes from 76, first 109 = (436/4) FAT sector locations
- #first_difat_pos : UInt32
- #first_difat_pos=(first_difat_pos : UInt32)
- #first_dir_sector : UInt32
- #first_dir_sector=(first_dir_sector : UInt32)
- #first_minifat_sector : UInt32
- #first_minifat_sector=(first_minifat_sector : UInt32)
- #magic : String
- #magic=(magic : String)
- #major_version : UInt16
- #major_version=(major_version : UInt16)
- #mini_sector_shift : UInt16
- #mini_sector_shift=(mini_sector_shift : UInt16)
- #mini_stream_cutoff : UInt32
- #mini_stream_cutoff=(mini_stream_cutoff : UInt32)
- #minifat_sector_size : Int32
- #minor_version : UInt16
- #minor_version=(minor_version : UInt16)
- #nr_dfat_sectors : UInt32
- #nr_dfat_sectors=(nr_dfat_sectors : UInt32)
- #nr_dir_sectors : UInt32
- #nr_dir_sectors=(nr_dir_sectors : UInt32)
-
#nr_fat_fields : Int32
Page 20
- #nr_fat_sectors : UInt32
- #nr_fat_sectors=(nr_fat_sectors : UInt32)
- #nr_mini_fat_sectors : UInt32
- #nr_mini_fat_sectors=(nr_mini_fat_sectors : UInt32)
- #reserved : String
- #reserved=(reserved : String)
- #sector_shift : UInt16
- #sector_shift=(sector_shift : UInt16)
-
#sector_size : Int32
returns the sector size version 3 : 512 version 4 : 4096
- #set_error(s : String)
- #size : Int32
- #status : Int32
- #status=(status : Int32)
- #trans_sig_number : UInt32
- #trans_sig_number=(trans_sig_number : UInt32)
- #validate : Bool
- #validate_byteorder
- #validate_clsid
- #validate_magic
- #validate_minor_sector_shift
- #validate_nr_dir_sectors
- #validate_reserved
-
#validate_sectorshift
Sector Shift (2 bytes): This field MUST be set to 0x0009, or 0x000c, depending on the Major Version field.
- #version : Int32
Constructor Detail
Instance Method Detail
size # start offset (decimal) property magic : Bytes = Bytes.new(8) # 8 bytes 0 property clsid : Bytes = Bytes.new(16) # 16 bytes 8 property minor_version : Bytes = Bytes.new(2) # 2 bytes 24 property major_version : Bytes = Bytes.new(2) # 2 bytes 26 property byte_order : Bytes = Bytes.new(2) # 2 bytes 28 property sector_shift : Bytes = Bytes.new(2) # 2 bytes 30 property mini_sector_shift : Bytes = Bytes.new(2) # 2 bytes 32 property reserved : Bytes = Bytes.new(6) # 6 bytes 34 property nr_dir_sectors : Bytes = Bytes.new(4) # 4 bytes 40 property nr_fat_sectors : Bytes = Bytes.new(4) # 4 bytes 44 property first_dir_sector : Bytes = Bytes.new(4) # 4 bytes 48 property trans_sig_number : Bytes = Bytes.new(4) # 4 bytes 52 property mini_stream_cutoff : Bytes = Bytes.new(4) # 4 bytes 56 property first_minifat_sector : Bytes = Bytes.new(4) # 4 bytes 60 property nr_mini_fat_sectors : Bytes = Bytes.new(4) # 4 bytes 64 property first_difat_loc : Bytes = Bytes.new(4) # 4 bytes 68 property nr_dfat_sectors : Bytes = Bytes.new(4) # 4 bytes 72 property difat : Bytes = Bytes.new(436) # 436 bytes from 76, first 109 = (436/4) FAT sector locations
size # start offset (decimal) property magic : Bytes = Bytes.new(8) # 8 bytes 0 property clsid : Bytes = Bytes.new(16) # 16 bytes 8 property minor_version : Bytes = Bytes.new(2) # 2 bytes 24 property major_version : Bytes = Bytes.new(2) # 2 bytes 26 property byte_order : Bytes = Bytes.new(2) # 2 bytes 28 property sector_shift : Bytes = Bytes.new(2) # 2 bytes 30 property mini_sector_shift : Bytes = Bytes.new(2) # 2 bytes 32 property reserved : Bytes = Bytes.new(6) # 6 bytes 34 property nr_dir_sectors : Bytes = Bytes.new(4) # 4 bytes 40 property nr_fat_sectors : Bytes = Bytes.new(4) # 4 bytes 44 property first_dir_sector : Bytes = Bytes.new(4) # 4 bytes 48 property trans_sig_number : Bytes = Bytes.new(4) # 4 bytes 52 property mini_stream_cutoff : Bytes = Bytes.new(4) # 4 bytes 56 property first_minifat_sector : Bytes = Bytes.new(4) # 4 bytes 60 property nr_mini_fat_sectors : Bytes = Bytes.new(4) # 4 bytes 64 property first_difat_loc : Bytes = Bytes.new(4) # 4 bytes 68 property nr_dfat_sectors : Bytes = Bytes.new(4) # 4 bytes 72 property difat : Bytes = Bytes.new(436) # 436 bytes from 76, first 109 = (436/4) FAT sector locations
Page 20
Next Sector in Chain (variable): This field specifies the next sector number in a chain of sectors. If Header Major Version is 3, there MUST be 128 fields specified to fill a 512-byte sector. If Header Major Version is 4, there MUST be 1,024 fields specified to fill a 4,096-byte sector.
Sector Shift (2 bytes): This field MUST be set to 0x0009, or 0x000c, depending on the Major Version field. This field specifies the sector size of the compound file as a power of 2.
If Major Version is 3, the Sector Shift MUST be 0x0009, specifying a sector size of 512 bytes. If Major Version is 4, the Sector Shift MUST be 0x000C, specifying a sector size of 4096 bytes.