eterl 1.1.0 copy "eterl: ^1.1.0" to clipboard
eterl: ^1.1.0 copied to clipboard

Eterl is a fast packer and unpacker for the External Term Erlang Format (version 131).

Eterl (External Term Erlang (format)) #

Eterl is a fast packer and unpacker for the External Term Erlang Format (version 131).

Example #

import 'package:eterl/eterl.dart';

void main() {
    final data = [{'hello': ['eterl', 1,2,3], 'l': [{'im': 'nested', 'i': {'also': 'supports unicode 💀🗿🥀 èè¨àà¨ü!ääüäöä£üüöäüéèéè>>>><<<<>>~~~'}}]}];
    final packed = eterl.pack(data);
    final unpacked = eterl.unpack(packed);
    print(unpacked);
}

Supported terms #

  • Strings
  • Atoms (only while decoding)
  • bools
  • doubles
  • ints
  • BigInts
  • Maps
  • Lists
  • Tuples (only while decoding, tuples are converted into a List)

Benchmarks #

dart run benchmark/eterl_benchmark.dart

[210ms:142us] Encoder: hello world
  mean: 0.15 ± 0.11 us, median: 0.13 ± 0.017 us
  ▉▂▄▂__________  110  _____ sample size: 100 (averaged over 225 runs)

[243ms:186us] Encoder: data
  mean: 2.59 ± 0.76 us, median: 2.28 ± 0.24 us
  ▆▉▄▂________________▁_______ sample size: 79 (averaged over 199 runs)

[274ms:047us] Encoder: Complex data
  mean: 49.75 ± 12.45 us, median: 42.58 ± 14.93 us
  ▉▁▁▁_ sample size: 28 (averaged over 46 runs)

[206ms:551us] Decoder: hello world
  mean: 0.23 ± 0.12 us, median: 0.17 ± 0.10 us
  ▉_▄▁_____________ sample size: 100 (averaged over 188 runs)

[243ms:790us] Decoder: data
  mean: 3.60 ± 1.17 us, median: 2.91 ± 1.46 us
  ▉▆▁▁▃_ sample size: 75 (averaged over 165 runs)

[266ms:378us] Decoder: Complex data
  mean: 158.66 ± 312.078 us, median: 63.87 ± 12.28 us
  ▉▅▁_▁____  149  _____ sample size: 27 (averaged over 28 runs)
4
likes
160
pub points
26%
popularity

Publisher

verified publisherlexedia.moe

Eterl is a fast packer and unpacker for the External Term Erlang Format (version 131).

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (license)

More

Packages that depend on eterl