struct

SleepParser::Header

Inherits Struct < Value < Object

Constants

ALGORITHM_MAX_LENGTH = HEADER_LENGTH - 8
HEADER_LENGTH = 32
INDICATOR = Slice[5_u8, 2_u8, 87_u8]

Constructors

new(file_type : SleepParser::FileType, entry_size : UInt16, hash_type : SleepParser::HashType, protocol_version : SleepParser::ProtocolVersion = ProtocolVersion::V0)
Source

Class methods

from_io(io : IO, format : IO::ByteFormat = IO::ByteFormat::NetworkEndian)
Source

Instance methods

entry_size

Size of each piece of data in the file body.

Source
file_type

Type of file.

Source
hash_type

Algorithm used for hashing the content.

Source
protocol_version

Version of the SLEEP protocol.

Source
to_io(io : IO, format : IO::ByteFormat = IO::ByteFormat::NetworkEndian)
Source
valid?
Source