lzma 0.4.0

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

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

  • 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"

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

Alternatively, your editor might support pub get or flutter packages 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 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

Analysis

We analyzed this package on Jun 19, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0-dev.63.0
  • pana: 0.11.3

Scores

Popularity:
Describes how popular the package is relative to other packages. [more]
69 / 100
Health:
Code health derived from static analysis. [more]
100 / 100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100 / 100
Overall score:
Weighted score of the above. [more]
84
Learn more about scoring.

Platforms

Detected platforms: Flutter, web, other

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

Suggestions

  • The description is too short.

    Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

  • Package is pre-v1 release.

    While there is nothing inherently wrong with versions of 0.*.*, it usually means that the author is still experimenting with the general direction API.

  • Fix analysis and formatting issues.

    Analysis or formatting checks reported 6 hints.

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

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

    Similar analysis of the following files failed:

    • lib/src/encoder.dart (hint)
    • lib/src/lz.dart (hint)
    • lib/src/range.dart (hint)
    • lib/src/stream.dart (hint)

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.24.3 <2.0.0
fixnum >=0.9.0 <0.11.0 0.10.7
test ^0.12.0 0.12.42 1.0.0
Transitive dependencies
analyzer 0.32.1
args 1.4.3
async 2.0.7
boolean_selector 1.0.3
charcode 1.1.1
collection 1.14.10
convert 2.0.1
crypto 2.0.5
csslib 0.14.4
front_end 0.1.1
glob 1.1.5
html 0.13.3+1
http 0.11.3+16
http_multi_server 2.0.5
http_parser 3.1.2
io 0.3.2+1
js 0.6.1
json_rpc_2 2.0.8
kernel 0.3.1
logging 0.11.3+1
matcher 0.12.3
meta 1.1.5
mime 0.9.6+1
multi_server_socket 1.0.1
node_preamble 1.4.2
package_config 1.0.3
package_resolver 1.0.3
path 1.6.1
plugin 0.2.0+2
pool 1.3.5
pub_semver 1.4.1
shelf 0.7.3+1
shelf_packages_handler 1.0.3
shelf_static 0.2.7+1
shelf_web_socket 0.2.2+2
source_map_stack_trace 1.1.4
source_maps 0.10.5
source_span 1.4.0
stack_trace 1.9.2
stream_channel 1.6.7+1
string_scanner 1.0.2
term_glyph 1.0.0
typed_data 1.1.5
utf 0.9.0+4
vm_service_client 0.2.4+3
watcher 0.9.7+8
web_socket_channel 1.0.8
yaml 2.1.14