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.
$ flutter pub add gbk_codecWhat 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.
- asn1lib
Encodes and decodes ASN.1 objects using BER byte encoding in Dart.
85Compare - csv_plus
Fast, zero-dependency CSV parser, encoder, streamer, and query engine for Dart.
82Compare - standard_message_codec
Binary codec for efficient encoding/decoding of Dart objects without a schema.
80Compare - enough_convert
Support for character encodings and codecs missing from dart:convert.
79Compare
Works with
Packages commonly used together with gbk_codec: ones it builds on, ones built on it, and its own family.
- htmlgbk_codec depends on itA Dart implementation of an HTML5 parser for strings and bytes.
- flutter_esc_pos_utilsBuilt on gbk_codecGenerate ESC/POS commands to print via Bluetooth, Network, or USB thermal printers.
- esc_pos_utilsBuilt on gbk_codecGenerate ESC/POS commands to send to thermal printers.
- esc_pos_dartBuilt on gbk_codecESC/POS thermal WiFi printer support for Dart.