wiithon.binary.reader module

class wiithon.binary.reader.BinaryReader(stream, encoding='utf-8')[source]

Bases: object

Parameters:
classmethod from_bytes(data)[source]
Parameters:

data (bytes)

Return type:

BinaryReader

seek(offset)[source]
Parameters:

offset (int)

Return type:

None

tell()[source]
Return type:

int

skip(count)[source]
Parameters:

count (int)

Return type:

None

u8()[source]
Return type:

int

u16()[source]
Return type:

int

u32()[source]
Return type:

int

u64()[source]
Return type:

int

s8()[source]
Return type:

int

s16()[source]
Return type:

int

s32()[source]
Return type:

int

s64()[source]
Return type:

int

float()[source]
Return type:

float

u32_shifted()[source]
Return type:

int

u32_le()[source]
Return type:

int

raw(size=-1)[source]
Parameters:

size (int, default: -1)

Return type:

bytes

list_u32(size)[source]
Parameters:

size (int)

Return type:

List[int]

string(size, encoding=None)[source]
Parameters:
Return type:

str

string_until_null(encoding=None)[source]
Parameters:

encoding (str | None, default: None)

Return type:

str