Skip to content
pubscout

lzma

1.0.1, released 6 years ago by an unverified publisher

Pure‑Dart LZMA compression library for encoding and decoding byte arrays.

WASM-readyRepository archived
$ flutter pub add lzma
Source repository

What it does

Provides lzma.encode to compress a list of bytes and lzma.decode to decompress LZMA data. The implementation is a manual port of the original Java SDK and works on all Dart platforms.

AI-written summary of version 1.0.1, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need LZMA compression in a pure‑Dart project without native plugins
  • Cross‑platform code (mobile, web, desktop) must stay in Dart

Skip it when

  • You need to compress data larger than 4 GB (output limited to 32 bits)
  • Streaming compression or high‑performance native codecs are required

Strengths

  • Pure Dart implementation – no native build steps
  • Simple API with just encode/decode functions
  • Works on all Dart platforms

Weaknesses

  • Output size limited to 32 bits
  • No streaming or incremental API
  • Last update was minor; may lack optimizations

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
1
import 'package:lzma/lzma.dart';

final input = <int>[0,1,2,3,4,5,6,7,8,9];
final compressed = lzma.encode(input);
final decompressed = lzma.decode(compressed);

Alternatives

Packages that do the same job and could replace lzma.

  • loading_indicator

    A collection loading animations written in pure dart. Out of the box, no extra dependency.

  • gzip

    A lightweight package for gzip compression and decompression.

  • dart_des

    Pure Dart implementation of the DES and Triple DES algorithms.

  • secp256k1

    Pure Dart implementation of secp256k1 ECDSA signing and verification

Works with

Packages commonly used together with lzma: ones it builds on, ones built on it, and its own family.