First cut of a libsolv-style string <-> id pool API
authorPanu Matilainen <pmatilai@redhat.com>
Fri, 7 Sep 2012 07:33:22 +0000 (10:33 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Fri, 7 Sep 2012 10:34:27 +0000 (13:34 +0300)
commit9e47043b2d23d6e6657a2a18dd325d2ef014dba3
tree87e1dd44653e0c4840843d8657bd19146ed31097
parenta466227a2ff77c90f0b524792a5a1eda3e47cbe7
First cut of a libsolv-style string <-> id pool API

- The pool stores "arbitrary" number of strings in a space-efficient
  manner, with near constant (hashed) string -> id lookup/store and
  constant time id -> string and id -> string length lookups.
- Credits for the idea go to the Suse developers working on libsolv,
  the basic concept is directly lifted from there but details
  differ due to using rpm's own hash table implementation etc.
  Another minor difference is using size_t for offsets to permit over
  4GB total data size on 64bit systems, the total number of id's in
  the pool is limited to uint32 max however (like in libsolv).
- Any (re)implementation bugs by yours truly, this is almost certainly
  going to need further tuning and tweaking, API and otherwise.
Makefile.am
preinstall.am
rpmio/Makefile.am
rpmio/rpmstrpool.c [new file with mode: 0644]
rpmio/rpmstrpool.h [new file with mode: 0644]