crclib
3.0.0, released 5 years ago by an unverified publisher
Provides CRC calculators as Dart converters and stream transformers.
WASM-readyRepository archived
What it does
Implements many cyclic redundancy check algorithms, exposing them as Converter objects that can process byte lists or streams. Also includes a flipper utility to modify data to achieve a target CRC value.
AI-written summary of version 3.0.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need CRC checksums (e.g., CRC‑32, CRC‑64) for file integrity or protocol validation
- You want a Dart‑native, null‑safe implementation without native code
- You need to process data incrementally via streams
Skip it when
- You require cryptographic hash functions (SHA, MD5) rather than error‑detecting CRCs
- You need a checksum algorithm not covered by the library
Strengths
- Pure Dart, works on all Flutter platforms
- Supports both one‑shot conversion and stream transformation
- Provides a flexible ParametricCrc for custom CRC definitions
- Includes a CrcFlipper for reverse‑engineering data to match a CRC
Weaknesses
- Only CRC algorithms; no other hash types
- API is low‑level; no high‑level helper for common file‑checksum workflows
- No code‑generation or declarative integration
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 2
final crc = Crc32Xz();
final bytes = utf8.encode('123456789');
print(crc.convert(bytes)); // 0xCBF43926Alternatives
Packages that do the same job and could replace crclib.
- nepali_utils
Pure Dart collection of Nepali utilities including Bikram Sambat date conversion and formatting.
56Compare
Works with
Packages commonly used together with crclib: ones it builds on, ones built on it, and its own family.
- tuplecrclib depends on itProvides immutable tuple classes for grouping values.
- bones_apiBuilt on crclibA powerful API backend framework for Dart with HTTP server, routing, SQL translator, and DB adapters.
- emvqrcodeBuilt on crclibEncode and decode EMVCO QR codes in Dart
- qrisBuilt on crclibParses Indonesian QRIS codes into merchant and transaction data.