BinaryReader

Vue de l’ensemble

‘BinaryReader’ est une classe dans Aspose.Font FOSS pour Python.

Remplacer une source byte dans le BytesIO recherchable pour la partage binaire de texte big-endian.

Cette classe fournit 20 méthodes pour travailler avec les objets de BinaryReader dans les programmes Python. Les méthodologies disponibles comprennent: __init__, read_bytes , read_cstring ; Read_f2dot14; Read_fixed : ‘read16_le،read_i32etred_ i8` .

méthodes

SignatureDescription
`init(source: bytesio.IOBase)`
tell()intReturns the current byte offset within the stream
seek(offset: int, whence: int)Moves the read cursor to the given offset using the specified whence
remaining()intReturns the number of unread bytes left in the stream
read_u8()intReads an unsigned 8‑bit integer and returns it as int
read_u16()intReads a big‑endian unsigned 16‑bit integer from the underlying byte source and advances the read cursor
read_u16_le()intReads a little‑endian unsigned 16‑bit integer
read_u32()intReads a big‑endian unsigned 32‑bit integer
read_u32_le()intReads a little‑endian unsigned 32‑bit integer
read_u64()intReads a big‑endian unsigned 64‑bit integer
read_i8()intReads a signed 8‑bit integer
read_i16()intReads a big‑endian signed 16‑bit integer
read_i16_le()intReads a little‑endian signed 16‑bit integer
read_i32()intReads a big‑endian signed 32‑bit integer
read_fixed()float16.16 fixed-point → float.
read_f2dot14()float2.14 fixed-point → float.
read_bytes(n: int)bytesReads n bytes from the stream and returns them as bytes
read_tag()strRead a 4-byte ASCII tag (e.g.
read_pascal_string()strRead a Pascal-style length-prefixed string.
read_cstring()strRead a null-terminated C string.

Voir aussi

  • Aspose.Font — référence API d’entreprise
 Français