12 releases (6 breaking)

0.7.0 Jun 24, 2024
0.6.0 Feb 28, 2024
0.5.0 Aug 8, 2022
0.4.0 Nov 30, 2021
0.1.3 Sep 29, 2019

#1060 in Encoding

MIT license

105KB
2.5K SLoC

Build Status

enc

This library aids in processing encoded data.

Dependencies & Features

Dependency:

enc = { version = "0.7.0", features = ["full"] }

There are no transitive-dependencies.

Features:

  • full
  • base-64
  • hex
  • percent
  • var-int

Data & Value Encoders

There are separate traits for encoding data and values.

The src/data folder holds the traits: Encoder, StringEncoder, Decoder and Validator. These provide an interface for encoders that operate on slices of data such as hex & base-64.

The src/value folder holds the traits: EncodedLen, EncodeToSlice, EncodeToWrite etc. These provide an interface for values that know how to encode and decode themselves such as variable-length integers (var-int) and can be easily extended by custom types.

No runtime deps

Features