Skip to content

A lightweight, pure-ruby reader/writer for DJ Bernstein's cdb format

License

Notifications You must be signed in to change notification settings

oesmith/cdb-ruby

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cdb-ruby

Lightweight, pure-ruby reader/writer for DJ Bernstein's cdb format.

Cdbs are fast, immutable, on-disk hashtables. They're great for storing modest (up to 4GB) amounts of arbitrary key-value pairs. They allow random lookup, but no enumeration or traversal.

file = File.new('table.cdb')
Cdb.writer(file) do |cdb|
  cdb['key1'] = 'value1'
  cdb['key2'] = 'value2'
  # ...
end

reader = Cdb.reader(file)
reader['key1']
# => "value1"

About

A lightweight, pure-ruby reader/writer for DJ Bernstein's cdb format

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages