20 releases (11 breaking)

new 0.12.0 Jul 7, 2025
0.10.0 May 15, 2025
0.9.0 Jan 23, 2025
0.7.0 Jun 24, 2024
0.3.0 Oct 13, 2019

#886 in Encoding

Download history 1/week @ 2025-04-15 139/week @ 2025-05-13 9/week @ 2025-05-20 2/week @ 2025-05-27 101/week @ 2025-06-24 76/week @ 2025-07-01

182 downloads per month
Used in web-scrape

MIT license

105KB
2.5K SLoC

enc

This library aids in processing encoded data.

Features & Dependencies

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

Primary Features

full
base-64                 
hex
percent
var-int

For more features see the Feature Flag Docs.

Dependencies

This crate has no dependencies.

Data & Value Encoding

There are separate traits for handling encoded data and encoded values.

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

The src/value folder holds the traits: EncodedLen, EncodeToSlice, EncodeToWrite etc. These traits provide an interface for values that know how to encode and decode themselves such as var-int.

Dependencies