Commit Graph

3 Commits

Author SHA1 Message Date
Elf M. Sternberg 550d4c1876 Intermediate progress: Squozen
I realized that the C version of this thing does multiple things
in the same function: it loads the bigrams, it iterates through
the database, and it compares the things found in the database
to the prepared pattern.  It seems to me, therefore, that we're
better off with an instance that loads the bigrams, then closes
the database immediately.

Later, the client can ask for one of two iterators: one that either
returns each entry in sequence, or one that returns each entry in sequence
that matches the pattern passed in.
2022-11-26 16:49:25 -08:00
Elf M. Sternberg 2eab17934c Moved everything around so it's more project-y
Added the squozen patprep function, added unit tests to the
patprep `c` code, and ensured that the rust version works the
same way.  The only remaining code slowdown is that re-allocating
the Vec 50 million times turns out to be slower than re-using the
same slice of RAM over and over and over.
2022-11-11 08:31:22 -08:00
Elf M. Sternberg 76a905da4e Successfully read the mlocatedb header.
This commit shows how to read the mlocatedb header,
with a test to assert that the read is correct.
2021-06-23 19:00:56 -07:00