adler32 1.0.0

  • Readme
  • Changelog
  • Example
  • Installing
  • 71

Port of SheetJS' adler32 written in Dart.

Instalation #

  $ pub get adler32

Usage #

Importing this library exposes the class Adler32 which contains 3 functions.

buf #

int buf(List<int> buf, [int seed])

The buf function takes an array of bytes as the first argument

Example #
  Adler32.buf([65,121,121,32,108,109,97,111,33,33,33]) // 381289312

bstr #

int bstr(String bstr, [int seed])

The bstr function takes a binary string the first argument

Example #
  Adler32.bstr("Ayy lmao!!!") // 381289312

str #

int str(String str, [int seed])

The str function takes a string the first argument

Example #
  Adler32.str("Ayy lmao!!!") // 381289312

Using seed

All 3 functions take a second optional argument for the starting "seed"

  int adler32 = Adler32.buf([65, 121, 121]);  // 36766004  "Ayy"
  adler32 = Adler32.str(" lmao", adler32);    // 217907965  "Ayy lmao"
  Adler32.bstr("!!!", adler32);               // 381289312 "Ayy lmao!!!"

License #

Apache 2.0 License

1.0.0 - December 23, 2018 #

  • First Release


import 'package:adler32/adler32.dart';

main(List<String> args) {

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  adler32: ^1.0.0

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:adler32/adler32.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Nov 4, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.6.0
  • pana: 0.12.21


Detected platforms: Flutter, web, other

No platform restriction found in primary library package:adler32/adler32.dart.

Health suggestions

Format lib/adler32.dart.

Run dartfmt to format lib/adler32.dart.

Format lib/src/util.dart.

Run dartfmt to format lib/src/util.dart.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.0.0 <3.0.0