Skip to content
pubscout

gzip

1.1.0, released 8 months ago by an unverified publisher

A lightweight package for gzip compression and decompression.

WASM-ready
$ flutter pub add gzip
Source repository

What it does

Provides a GZip utility class to compress and decompress Uint8List data. It relies on dart:io and package:web for the actual implementations to support multiple platforms.

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

Use it when

  • You need to compress or decompress data using gzip in a Dart or Flutter application.
  • You require cross-platform gzip support including the web.

Skip it when

  • You are looking for other types of compression algorithms like zlib or tar.
  • You already use standard dart:io compression and do not need web platform support.

Strengths

  • Lightweight and simple to use.
  • Supports web along with mobile and desktop platforms.

Weaknesses

  • Limited functionality beyond basic gzip compression and decompression.

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
1

not documented

import 'dart:typed_data';
import 'package:gzip/gzip.dart';

Future<void> main() async {
  final zipper = GZip();
  final input = Uint8List.fromList('Hello World'.codeUnits);
  final compress = await zipper.compress(input);
  final decompress = await zipper.decompress(Uint8List.fromList(compress));
}

Alternatives

Packages that do the same job and could replace gzip.

  • archive

    Encodes and decodes archive and compression formats such as zip, tar, gzip, and zlib.

  • zstandard

    Flutter plugin for fast Zstandard compression and decompression across native and WebAssembly.

  • es_compression

    Compression framework providing FFI implementations for Brotli, Lz4, and Zstd.

  • shrink

    Compresses data to 5x‑40x smaller size with lossless restoration

Works with

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