mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-02-05 17:28:23 +08:00
14 lines
296 B
Python
14 lines
296 B
Python
import _struct
|
|
|
|
|
|
def pack(fmt: str, *args) -> bytes:
|
|
return _struct.pack(fmt, *args)
|
|
|
|
|
|
def unpack(fmt: str, data: bytes, offset=0) -> tuple:
|
|
return _struct.unpack(fmt, data, offset)
|
|
|
|
|
|
def unpack_from(fmt: str, data: bytes, offset=0) -> tuple:
|
|
return _struct.unpack(fmt, data, offset)
|