fast_gbk 1.0.0 copy "fast_gbk: ^1.0.0" to clipboard
fast_gbk: ^1.0.0 copied to clipboard

a fast gbk codec, support GBK encoding and decoding with stream api.

example/example.dart

import 'package:fast_gbk/fast_gbk.dart';
void main() async {
  // normal usage
  var encoded = gbk.encode("白日依山尽,黄河入海流");
  print(encoded);
  var decoded = gbk.decode([176, 215, 200, 213, 210, 192, 201, 189, 190, 161, 163,
                            172, 187, 198, 186, 211, 200, 235, 186, 163, 193, 247]);
  print(decoded);
  //output a �, instead of throw a exception.
  var codec = GbkCodec(allowMalformed: true);
  var decodedMalform = codec.decode([20001]);
  print(decodedMalform);
}
15
likes
150
pub points
92%
popularity

Publisher

unverified uploader

a fast gbk codec, support GBK encoding and decoding with stream api.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

More

Packages that depend on fast_gbk