This commit is contained in:
lz_db
2025-11-16 12:31:03 +08:00
commit 0fab423a18
1451 changed files with 743213 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
from ...utils.toolz import (
curry,
)
@curry
def zpad(value: bytes, length: int) -> bytes:
return value.rjust(length, b"\x00")
zpad32 = zpad(length=32)
@curry
def zpad_right(value: bytes, length: int) -> bytes:
return value.ljust(length, b"\x00")
zpad32_right = zpad_right(length=32)
@curry
def fpad(value: bytes, length: int) -> bytes:
return value.rjust(length, b"\xff")
fpad32 = fpad(length=32)