python-huffman

huffman encode and decode


Keywords
huffman, encode, decode, cffi, cython, pypy, python3
License
GPL-3.0
Install
pip install python-huffman==0.1.3

Documentation

pyhuffman

The python binding for huffman

pypi python implementation wheel license action

公开函数

from typing import IO, Union
from pathlib import Path

InputType = Union[str, bytes, Path, IO]

def encode_file(in_: InputType, out_: InputType) -> int: ...
def decode_file(in_: InputType, out_: InputType) -> int: ...
def encode(data: bytes) -> bytes: ...
def decode(data: bytes) -> bytes: ...

环境变量

HFM_USE_CFFI强制使用cffi后端