Class RPM::File::Header
In: lib/arr-pm/file/header.rb
lib/arr-pm/file/header.rb
Parent: Object

Methods

new   new   read   read   validate   validate   write   write  

Included Modules

Cabin::Inspectable Cabin::Inspectable

Constants

HEADER_SIGNED_TYPE = 5
HEADER_MAGIC = [0x8eade801, 0x00000000].pack("NN")   Ruby 2 forces all strings to be UTF-8, so "\x01" becomes "\u0001" which is two bytes 00 01 which is not what we want. I can‘t find a sane way to create a string without this madness in Ruby 2, so let‘s just pack two 4-byte integers and go about our day.
HEADER_MAGIC = "\x8e\xad\xe8\x01\x00\x00\x00\x00"
HEADER_HEADER_LENGTH = HEADER_MAGIC.length + 4 + 4   magic + index_count + data_length
TAG_ENTRY_SIZE = 16
HEADER_SIGNED_TYPE = 5
HEADER_MAGIC = [0x8eade801, 0x00000000].pack("NN")   Ruby 2 forces all strings to be UTF-8, so "\x01" becomes "\u0001" which is two bytes 00 01 which is not what we want. I can‘t find a sane way to create a string without this madness in Ruby 2, so let‘s just pack two 4-byte integers and go about our day.
HEADER_MAGIC = "\x8e\xad\xe8\x01\x00\x00\x00\x00"
HEADER_HEADER_LENGTH = HEADER_MAGIC.length + 4 + 4   magic + index_count + data_length
TAG_ENTRY_SIZE = 16

Attributes

data_length  [RW] 
data_length  [RW] 
index_count  [RW] 
index_count  [RW] 
length  [R] 
length  [R] 
magic  [RW] 
magic  [RW] 
tags  [R] 
tags  [R] 

Public Class methods

Public Instance methods

[Validate]