Skip to content
pubscout

gbk_codec

0.4.0, released 5 years ago by an unverified publisher

GBK codec converter library for encoding and decoding strings and byte streams.

WASM-ready
$ flutter pub add gbk_codec

What it does

Provides a pure Dart solution for encoding and decoding GBK character sets. Includes standard 16-bits codec and a byte codec for handling byte streams.

AI-written summary of version 0.4.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to encode or decode GBK encoded text in a pure Dart application
  • You are parsing web pages or streams using the GBK character encoding

Skip it when

  • You only work with standard UTF-8 encodings supported natively by Dart

Strengths

  • Pure Dart solution supporting all platforms
  • Provides both standard 16-bit codec and byte stream codec

Weaknesses

  • Limited to GBK encoding requirements

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
1
import 'package:gbk_codec/gbk_codec.dart';

main() {
  String text = 'dart GBK code 兩岸猿聲啼不住';
  List<int> gbkCodes = gbk.encode(text);
  String decoded_text = gbk.decode(gbkCodes);
  print(decoded_text);
}

Alternatives

Packages that do the same job and could replace gbk_codec.

Works with

Packages commonly used together with gbk_codec: ones it builds on, ones built on it, and its own family.