leb128
LEB128(Little Endian Base 128)
Decision gist · record as of 2026-08-14
Yes. The package is actively maintained, has no dependencies, installs cleanly, carries a permissive MIT license, and solves a specific technical problem (LEB128 encoding/decoding) that you would otherwise need to implement yourself. Use it if you're working with WebAssembly, DWARF debug formats, or need LEB128 compression in your own binary protocols.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low friction: pure Python wheel with no runtime dependencies.
- Last commit 2026-03-27 and active maintenance status.
License · maintenance · safety
permissive license (permissive) — MIT License permits unrestricted use, modification, and distribution with only attribution and liability disclaimer required.
last release 2026-01-09 (217 days) · last repo commit 2026-03-27 · 31 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 3,543,677 downloads/mo, #2,581 on PyPI
Alternatives
Verify before relying
import leb128
import io
# Unsigned encoding/decoding
assert leb128.u.encode(624485) == bytearray([0xe5, 0x8e, 0x26])
assert leb128.u.decode(bytearray([0xe5, 0x8e, 0x26])) == 624485
# Signed encoding/decoding
assert leb128.i.encode(-12345) == bytearray([0xc7, 0x9f, 0x7f])
assert leb128.i.decode(bytearray([0xc7, 0x9f, 0x7f])) == -12345What it is and what it does
LEB128 is a variable-length integer encoding scheme that compresses arbitrarily large integers into a small number of bytes. This package provides Python functions to encode and decode both signed and unsigned integers in LEB128 format, with support for streaming decoding via file-like objects.
The format is used in two major contexts: DWARF debug information (used by debuggers and profilers) and WebAssembly binary encoding (for all integer literals in WASM modules). If you're working with either of these formats or need compact integer serialization, this library handles the encoding/decoding mechanics so you don't have to implement them yourself.
Use it for
- Parse or generate WebAssembly binary modules that use LEB128 for integer encoding.
- Read DWARF debug information from compiled binaries for debugging or analysis tools.
- Serialize integers compactly in custom binary protocols or file formats.
- Decode streaming integer data from file-like objects without loading entire buffers.
- Handle both signed and unsigned integer encoding in a single library.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The package is actively maintained, has no dependencies, installs cleanly, carries a permissive MIT license, and solves a specific technical problem (LEB128 encoding/decoding) that you would otherwise need to implement yourself. Use it if you're working with WebAssembly, DWARF debug formats, or need LEB128 compression in your own binary protocols.
Install
leb128 on PyPI
Before you install
Low friction: pure Python wheel with no runtime dependencies. Last commit 2026-03-27 and active maintenance status.
License in practice
MIT License permits unrestricted use, modification, and distribution with only attribution and liability disclaimer required.
Quickstart
import leb128
import io
# Unsigned encoding/decoding
assert leb128.u.encode(624485) == bytearray([0xe5, 0x8e, 0x26])
assert leb128.u.decode(bytearray([0xe5, 0x8e, 0x26])) == 624485
# Signed encoding/decoding
assert leb128.i.encode(-12345) == bytearray([0xc7, 0x9f, 0x7f])
assert leb128.i.decode(bytearray([0xc7, 0x9f, 0x7f])) == -12345
Package facts
| License | permissive license permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 217 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 3,543,677 / month, #2,581 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
Evidence: leb128-1.0.9-py2.py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “leb128 encoding decoding”
- leb128Encodes and decodes integers using LEB128 (Little Endian Base 128), a…
- basesProvides customizable Base-N encoding and decoding for common styles…
- base2048Encodes and decodes binary data using Base2048, a character encoding…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also fixedint · bech32m · bitarray-hardbyte · rlp · base36 · cint · ecoji · overpunch · base58check · pylzss