Skip to main content

ListCrunch

A simple human-readable way to compress redundant sequential data.

Example

from listcrunch import crunch

compressed_string = crunch([1, 1, 1, 1, 1, 1, 1, 1, 1, 2])
# Returns '1:0-8;2:9', meaning 1 appears in indices 0-8 (inclusive),
# and 2 occurs at index 9.

To uncompress, use the uncrunch function.

from listcrunch import uncrunch

uncrunch('50:0-1,3-4;3:2,5;60:6;70:7-8')
# Returns ['50', '50', '3', '50', '50', '3', '60', '70', '70']

Metadata

Release files for listcrunch 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for listcrunch 1.0.1
File Size Uploaded
listcrunch-1.0.1.tar.gz 2.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for listcrunch 1.0.1
File Interpreter ABI Platform
listcrunch-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 6.3 kB

Release files / listcrunch-1.0.1.tar.gz

Download URL listcrunch-1.0.1.tar.gz
Size 2.4 kB
Tags Source
SHA-256 checksum
How to use checksums
2b90aa04196061976baaf642868178edcba85826da2845a452530df8596d006e
BLAKE2b-256 checksum
How to use checksums
8beb32b182f866b37af53c01c3a7845909f9f56462f614c12bf9c90de79442f4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/47.2.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.7.6

Release files / listcrunch-1.0.1-py3-none-any.whl

Download URL listcrunch-1.0.1-py3-none-any.whl
Size 3.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2d95b83ef52efac47b86776a8962ae34d81c6835a7e5945f12c1d9c8472bb9fb
BLAKE2b-256 checksum
How to use checksums
a8a653f105ddc0650e0dea3f3e746803c9c697438e4931996f10e6707438415e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/47.2.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.7.6

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page