BinaryReader
BinaryReader
概述
BinaryReader 是Python的Aspose.Font FOSS中的一个类.
在搜索BytesIO中包装一个字节源,用于大安迪亚字体二进制解析.
这个类提供了20种方法,用于在Python程序中与BinaryReader对象工作. 有的方法包括: __init__, read_bytes, read_cstring, read_f2dot14, read_fixed, read_i16, read_i16_le, read_i32, read_i8, read_pascal_string, read_tag, read_u16,其他8种方法. 在安装Python包的Aspose.Font FOSS后,所有公众成员都可以访问任何 Python 应用程序.
方法
| Signature | 描述情况 |
|---|---|
| `init(source: bytes | io.IOBase)` |
tell() → int | 返回流中的当前字节偏移值. |
seek(offset: int, whence: int) | 使用指定的where移动读取指标到给定的偏差点 |
remaining() → int | 返回流中剩下的未读字节数量 |
read_u8() → int | 读取未签名的8位整数,并返回为int |
read_u16() → int | 从底层字节源读取一个大端无签名的16位整数,并向前传递阅读指标符 |
read_u16_le() → int | 读取一个小的无符号16位整数. |
read_u32() → int | 读取一个大端的32位不签名整数. |
read_u32_le() → int | 读取一个小的无符号32位整数. |
read_u64() → int | 读取一个大端无符号的64位整数. |
read_i8() → int | 读取一个签名的8位整数. |
read_i16() → int | 读取一个大端签名的16位整数. |
read_i16_le() → int | 读取一个16位整数的小安迪安签名 |
read_i32() → int | 读取一个大端签名的32位整数. |
read_fixed() → float | 16.16 fixed-point → float. |
read_f2dot14() → float | 2.14 fixed-point → float. |
read_bytes(n: int) → bytes | 从流中读取n个字节并以字符返回它们. |
read_tag() → str | 读取4字节的ASCII标签 (例如:. |
read_pascal_string() → str | 读一个 Pascal 式的长度前字符串. |
read_cstring() → str | 读一个零终结的C字符串. |