DDF.TECHNOLOGY

PortfolioGGUFCompressionLab

GitHub downloads
PortfolioAI & Data Engineering
MIT / FREE Python 3.10+ v1.0.0

GGUFCompressionLab

A small command-line laboratory that streams a GGUF file, estimates byte-level Shannon entropy and compares four general-purpose lossless compressors.

GGUF stream analysis and compression comparison workflow
Local streaming analysis
01

// Workflow

Measure first, then compare

  1. 01*.ggufSelect a non-empty local file
  2. 021 MiB → H(X)Stream bytes and estimate entropy
  3. 03size / ratioCompare generated outputs
02

// Algorithms

Four standard-library compressors

LZMA .xz

High compression ratio, generally slower.

GZIP .gz

Widely supported and balanced.

BZIP2 .bz2

Alternative block-sorting comparison.

ZLIB .zlib

Fast DEFLATE stream with a small wrapper.

03

// Boundaries

Explicit experimental scope

What it measures

  • Original and compressed byte size
  • Byte-frequency distribution
  • Shannon entropy in bit per byte
  • Compression ratio per algorithm

What it does not measure

  • Tensor structure or model semantics
  • Quantisation quality
  • Inference speed or accuracy
  • Specialised GGUF compression
04

// Release & licence

Readable, tested and reusable

MIT License

Source and documentation may be used, modified and redistributed while preserving the notice.

5 tests

Entropy, empty input and lossless round-trip for all four algorithms.

colorama + tqdm

Third-party owners and licence links are documented in the repository.

Disk usage

Running every algorithm creates four outputs beside the original and may take a long time on large models.

SHA-256

34c1ce293377…caab2cd
Verified after downloading the public release asset.