rsc/ordered

Ordered codes for database keys

Go

46

6 commits

updated Jul 9, 2024

See the code

README

Ordered defines an encoding of a sequence of basic typed values into []byte and back. The encoding is “ordered” in the sense that bytes.Compare on the byte slices matches cmp.Compare on the original values. The order-preserving encoding is particularly useful for preparing keys in an ordered key/value storage such as Bigtable, Bolt, CockroachDB, LevelDB, Pebble, RocksDB, or Spanner.

This package is inspired by github.com/google/orderedcode but uses a different, self-describing encoding.

See the package documentation for details and examples.

rsc/ordered

Ordered codes for database keys

Go

46

6 commits

updated Jul 9, 2024

See the code

README

Ordered defines an encoding of a sequence of basic typed values into []byte and back. The encoding is “ordered” in the sense that bytes.Compare on the byte slices matches cmp.Compare on the original values. The order-preserving encoding is particularly useful for preparing keys in an ordered key/value storage such as Bigtable, Bolt, CockroachDB, LevelDB, Pebble, RocksDB, or Spanner.

This package is inspired by github.com/google/orderedcode but uses a different, self-describing encoding.

See the package documentation for details and examples.

Project health

Latest release

v1.1.1 · Jul 9, 2024

Releases this year

0

Significant stargazers

Simon Klee

182 followers · starred Jun 2024

Jaewan Park

70 followers · starred Jun 2024