leb128 0.9.0 copy "leb128: ^0.9.0" to clipboard
leb128: ^0.9.0 copied to clipboard

outdated

A Dart package that can read and write numbers in the LEB128, short for Little Endian Base 128, format.

example/lib/main.dart

import 'package:leb128/leb128.dart';

void main() {
  var input = -9019283812387;

  // Encode the large number shown above
  var output = Leb128.encode(input);

  // Print the individual bytes of the encoded
  // number in hex
  output.forEach((x) {
    print(x.toRadixString(16));
  });

  // Decode the LEB128 number into an ordinary integer and
  // print it
  print(Leb128.decodeSigned(output, 64));
}
2
likes
0
pub points
48%
popularity

Publisher

unverified uploader

A Dart package that can read and write numbers in the LEB128, short for Little Endian Base 128, format.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on leb128