adler32 1.0.0

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 68

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

example/example.dart

import 'package:adler32/adler32.dart';

main(List<String> args) {
  print(Adler32.str(args[0]));
}

Use this package as a library

1. Depend on it

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


dependencies:
  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';
  
Version Uploaded Documentation Archive
1.0.0 Dec 24, 2018 Go to the documentation of adler32 1.0.0 Download adler32 1.0.0 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
35
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
68
Learn more about scoring.

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

  • Dart: 2.3.1
  • pana: 0.12.16

Platforms

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.

Dependencies

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