view README.md @ 150:01e070c97ee7

Fix bug in default comparator: Return correct separator for difficult cases This is important if TableBuilder wants a separator between K and succ(K), where succ(K) is usually just a string of K's first characters plus 1. In this case we now return K with its last byte incremented by one, which isn't really "short" anymore, but a valid separator. Otherwise, logic relying on the key in index blocks being actually *past* the referenced block fails in some cases, for example on the last block of a table.
author Lewin Bormann <lbo@spheniscida.de>
date Sun, 29 Jan 2017 16:13:36 +0100
parents d6a5c7e8d40f
children f3d44aa3fbdf
line wrap: on
line source

# leveldb-rs

A fully compatible implementation of LevelDB in Rust.

## Status

In development; most of the infrastructure exists, but the actual database logic
has not yet been implemented.

## Goals

Some of the goals of this implementation are

* As few copies of data as possible; most of the time, slices of bytes (`&[u8]`)
  are used. Owned memory is represented as `Vec<u8>` (and then possibly borrowed
  as slice).
* Correctness -- self-checking implementation, good test coverage, etc. Just
  like the original implementation.
* Clarity; commented code, clear structure (hopefully doing a better job than
  the original implementation).
* Coming close-ish to the original implementation; clarifying the translation of
  typical C++ constructs to Rust.