forked from K0lb3/UnityPy
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathEndianBinaryReader.pyi
More file actions
89 lines (82 loc) · 4.38 KB
/
Copy pathEndianBinaryReader.pyi
File metadata and controls
89 lines (82 loc) · 4.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
from ..math import Color as Color, Matrix4x4 as Matrix4x4, Quaternion as Quaternion, Rectangle as Rectangle, Vector2 as Vector2, Vector3 as Vector3, Vector4 as Vector4
from ..files import ObjectReader
from io import BytesIO, IOBase
from typing import Callable, List, Union
SYS_ENDIAN: str
class EndianBinaryReader:
Length: int
Position: int
BaseOffset: int
Crypto: Callable
def __new__(cls, item: Union[bytes, bytearray, memoryview, BytesIO, str], endian: str = ..., offset: int = ..., size: int = ..., crypto_func: Callable | None = ...): ...
def __init__(self, item, endian: str = ..., offset: int = ..., size: int = ..., crypto_func: Callable = ...) -> None: ...
def read(self, *args) -> None: ...
def read_the_rest(self) -> bytes: ...
def within_size(self) -> bool: ...
def read_bytes(self, num) -> bytes: ...
def read_byte(self) -> int: ...
def read_u_byte(self) -> int: ...
def read_short(self) -> int: ...
def read_int(self) -> int: ...
def read_long(self) -> int: ...
def read_u_short(self) -> int: ...
def read_u_int(self) -> int: ...
def read_u_long(self) -> int: ...
def read_float(self) -> float: ...
def read_double(self) -> float: ...
def read_boolean(self) -> bool: ...
def read_string(self, size: int | None = ..., encoding: str = ...) -> str: ...
def read_string_to_null(self, max_length: int = ...) -> str: ...
def read_aligned_string(self) -> str: ...
def align_stream(self, alignment: int = ...) -> None: ...
def read_color_uint(self) -> Color: ...
def read_quaternion(self) -> Quaternion: ...
def read_vector2(self) -> Vector2: ...
def read_vector3(self) -> Vector3: ...
def read_vector4(self) -> Vector4: ...
def read_vector(self, command) -> list: ...
def read_map(self, command) -> dict: ...
def read_rectangle_f(self) -> Rectangle: ...
def read_color4(self) -> Color: ...
def read_byte_array(self) -> bytes: ...
def read_matrix(self) -> Matrix4x4: ...
def read_array(self, command, length: int) -> list: ...
def read_array_struct(self, param: str, length: int = ...) -> list: ...
def read_boolean_array(self, length: int = None) -> List[bool]: ...
def read_u_short_array(self, length: int = None) -> List[int]: ...
def read_short_array(self, length: int = None) -> List[int]: ...
def read_int_array(self, length: int = None) -> List[int]: ...
def read_u_int_array(self, length: int = None) -> List[int]: ...
def read_long_array(self, length: int = None) -> List[int]: ...
def read_u_long_array(self, length: int = None) -> List[int]: ...
def read_u_int_array_array(self, length: int = None) -> List[int]: ...
def read_float_array(self, length: int = None) -> List[float]: ...
def read_string_array(self, length: int = None) -> List[str]: ...
def read_vector2_array(self, length: int = None) -> List[Vector2]: ...
def read_vector4_array(self, length: int = None) -> List[Vector4]: ...
def read_matrix_array(self, length: int = None) -> List[Matrix4x4]: ...
def real_offset(self) -> int: ...
def seek(self, value: int = ...) -> None: ...
def seek_relative(self, value: int = ...)-> None: ...
def close(self) -> None: ...
class EndianBinaryReader_Memoryview(EndianBinaryReader):
view: memoryview
endian: str
def __init__(self, view: memoryview, endian: str = ..., offset: int = ..., size: int | None = ..., crypto_func: Callable = ...) -> None: ...
@property
def bytes(self) -> memoryview: ...
def save(self) -> memoryview: ...
def read(self, length: int) -> memoryview: ...
class EndianBinaryReader_Memoryview_LittleEndian(EndianBinaryReader_Memoryview): ...
class EndianBinaryReader_Memoryview_BigEndian(EndianBinaryReader_Memoryview): ...
class EndianBinaryReader_Streamable(EndianBinaryReader):
stream: IOBase
endian: str
def __init__(self, stream: IOBase, endian: str = ..., offset: int = ..., size: int = ..., crypto_func: Callable = ...) -> None: ...
def save(self) -> bytes: ...
def read(self, length: int) -> bytes: ...
class EndianBinaryReader_Streamable_LittleEndian(EndianBinaryReader_Streamable): ...
class EndianBinaryReader_Streamable_BigEndian(EndianBinaryReader_Streamable): ...
def generate_streamable_read_method(endian, type_id, native_type): ...
def generate_memoryview_read_method(endian, type_id, native_type): ...
def generate_array_read_method(type_name): ...