tlv_decoder

Creator: coderz1093

Last updated:

0 purchases

tlv_decoder Image
tlv_decoder Images

Languages

Categories

Add to Cart

Description:

tlv decoder

TLV stands for "Type-Length-Value," and it is a data structure used to encapsulate multiple pieces of information into a single entity.
Features #
TLV encoding and decoding.
Getting started #
dependencies:
tlv_decoder: ^0.0.3
copied to clipboard
Usage #
A simple usage example:
import 'dart:typed_data';

import 'package:tlv_decoder/tlv_decoder.dart';

// Decoding
List<int> data = [0x01, 0x03, 0x41, 0x42, 0x43, 0x02, 0x02, 0x44, 0x45];
Uint8List bytes = Uint8List.fromList(data);
List<TLV> tlvList = TlvUtils.decode(bytes);

// Encoding
List<TLV> tlvList = [TLV(type: 1, length: 3, value: [0x41, 0x42, 0x43]), TLV(type: 2, length: 2, value: [0x44, 0x45])];
Uint8List encodedData = TlvUtils.encode(tlvList);
copied to clipboard
Features and bugs #
Please feel free for feature requests and bugs at the issue tracker.
License #
Project under MIT license.
Donation #

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.