lzma 0.4.0+1

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

package:lzma is a port of LZMA compression algorithm to Dart.

The source code is a manual translation from the original Java version found on the LZMA SDK.

How to use it?

If you want to compress data then just call to the lzma.encode function, and for the reverse call lzma.decode:

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);

Limitations

  • Output data size is limited to 32 bits.

0.4.0+1

  • Updated test dependency -> dev_dependency.

0.4.0

  • BREAKING CHANGE: Replacing public API with LzmaCodec and lzma instance.

0.3.0 - Jan 25, 2014

  • Updated README.md, LICENSE.txt and CHANGELOG.md

0.2.1 - Nov 09, 2013

  • Updated README.md

0.2.0 - Nov 08, 2013

  • Added List<String> args to main function, Options class was removed from SDK
  • Used fixnum package from pub, removed local package
  • Fixed sublist parameters, now end is exclusive
  • Removed annoying "There is no such operator '>>' in num" warning
  • Ready for Dart 1.0.0!

0.1.3 - Mar 25, 2013

  • Updated fixnum library
  • Removed deprecated List.fixedLength constructor
  • Changed List.getRange for sublist

0.1.2 - Feb 01, 2013

  • Pre-M3 update

0.1.1 - Jan 18, 2013

  • Fixed some README.md tags
  • Added licenses directory
  • Added CHANGES.md

0.1.0 - Jan 17, 2013

  • First Dart pub package release

example/example.dart

import 'dart:async';
import 'dart:io';

import 'package:lzma/lzma.dart';

Future main(List<String> args) async {
  if (args.length != 2) {
    print('Usage: compress input output');
    return;
  }

  final inFile = new File(args[0]);
  final outFile = new File(args[1]);

  final encoded = lzma.encode(await inFile.readAsBytes());
  await outFile.writeAsBytes(encoded);
}

Use this package as a library

1. Depend on it

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


dependencies:
  lzma: ^0.4.0+1

2. Install it

You can install packages from the command line:

with pub:


$ pub get

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

3. Import it

Now in your Dart code, you can use:


import 'package:lzma/lzma.dart';
  
Version Uploaded Documentation Archive
0.4.0+1 Jul 1, 2018 Go to the documentation of lzma 0.4.0+1 Download lzma 0.4.0+1 archive
0.4.0 Mar 29, 2018 Go to the documentation of lzma 0.4.0 Download lzma 0.4.0 archive
0.3.0 Jan 25, 2014 Go to the documentation of lzma 0.3.0 Download lzma 0.3.0 archive
0.2.1 Nov 8, 2013 Go to the documentation of lzma 0.2.1 Download lzma 0.2.1 archive
0.2.0 Nov 8, 2013 Go to the documentation of lzma 0.2.0 Download lzma 0.2.0 archive
0.1.3 Mar 25, 2013 Go to the documentation of lzma 0.1.3 Download lzma 0.1.3 archive
0.1.2 Feb 1, 2013 Go to the documentation of lzma 0.1.2 Download lzma 0.1.2 archive
0.1.1 Jan 18, 2013 Go to the documentation of lzma 0.1.1 Download lzma 0.1.1 archive
0.1.0 Jan 17, 2013 Go to the documentation of lzma 0.1.0 Download lzma 0.1.0 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
45
Health:
Code health derived from static analysis. [more]
0
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
0
Overall:
Weighted score of the above. [more]
23
Learn more about scoring.

The package version is not analyzed, because it does not support Dart 2. Until this is resolved, the package will receive a health and maintenance score of 0.

Issues and suggestions

Support Dart 2 in pubspec.yaml.

The SDK constraint in pubspec.yaml doesn't allow the Dart 2.0.0 release. For information about upgrading it to be Dart 2 compatible, please see https://www.dartlang.org/dart-2#migration.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.24.3 <2.0.0