Skip to content

NtStr

NtStr

[De]serialize a null terminated string with a fixed length N using the syntax NtStr[N]. Use the syntax NtStr[N]._0[Encoding.UTF8, Encoding.ASCII] to specify a main and optionally a second fallback encoding (UTF8 and ASCII are defaults)

__class_getitem__ classmethod

__class_getitem__(item: int | Encoding | tuple[Encoding, Encoding]) -> type

from_bytes classmethod

from_bytes(bytes_: bytes, ver: Version = Version(0)) -> str

from_file classmethod

from_file(filepath: str) -> str

from_stream classmethod

from_stream(value: ByteStream, ver: Version = Version(0)) -> str

to_bytes classmethod

to_bytes(value: str) -> bytes

to_file classmethod

to_file(filepath: str, value: str)

c_str

Bases: NtStr

A C style null terminated string. Use the syntax c_str._0[Encoding.UTF8, Encoding.ASCII] to specify a main and optionally a second fallback encoding (UTF8 and ASCII are defaults)

nt_str8

Bases: NtStr

[De]serialize a null terminated string whose length is also indicated by a leading u8. Use the syntax nt_str8._0[Encoding.UTF8, Encoding.ASCII] to specify a main and optionally a second fallback encoding (UTF8 and ASCII are defaults)

nt_str16

Bases: NtStr

[De]serialize a null terminated string whose length is also indicated by a leading u16. Use the syntax nt_str16._0[Encoding.UTF8, Encoding.ASCII] to specify a main and optionally a second fallback encoding (UTF8 and ASCII are defaults)

nt_str32

Bases: NtStr

[De]serialize a null terminated string whose length is also indicated by a leading u32. Use the syntax nt_str32._0[Encoding.UTF8, Encoding.ASCII] to specify a main and optionally a second fallback encoding (UTF8 and ASCII are defaults)

nt_str64

Bases: NtStr

[De]serialize a null terminated string whose length is also indicated by a leading u64. Use the syntax nt_str64._0[Encoding.UTF8, Encoding.ASCII] to specify a main and optionally a second fallback encoding (UTF8 and ASCII are defaults)

nt_str128

Bases: NtStr

[De]serialize a null terminated string whose length is also indicated by a leading u128. Use the syntax nt_str128._0[Encoding.UTF8, Encoding.ASCII] to specify a main and optionally a second fallback encoding (UTF8 and ASCII are defaults)