Comments (9)
Small clarification: I was not correct about utf8: utf8 may include zero byte
because NUL unicode codepoint is represented as zero byte in utf8. There are no
other possible zero bytes in UTF8 (multibyte codepoints have some bits set in
all bytes) so this is usually not an issue.
Original comment by [email protected]
on 25 Aug 2012 at 8:31
from dawgdic.
In a Python wrapper I've resolved this by encoding <binary_value> to base64.
Encoding/decoding speed doesn't become bottleneck (when using
http://libb64.sourceforge.net/ decoding is orders of magnitude faster than
Completer iteration speed).
Original comment by [email protected]
on 4 Sep 2012 at 9:38
from dawgdic.
I'm sorry that I couldn't help you.
As you mentioned, Completer uses '\0' as the sentinel and it seems to be
impossible to fix this without changing the structure of its auxiliary data.
Also, the change will increase the size of the auxiliary data.
So, now I'm planning to implement a new Completer for binary keys.
Original comment by [email protected]
on 7 Sep 2012 at 12:10
- Changed state: Accepted
from dawgdic.
Thanks! This would be a very useful feature.
Original comment by [email protected]
on 7 Sep 2012 at 12:42
from dawgdic.
I'm really sorry.
It has turned out that it is impossible to support binary keys without changing
its core data structure (major update).
When I posted the last comment, I expected that dawgdic can support binary keys
without changing Dictionary.
However, I've found that not only Completer but also Dictionary require
modification.
In addition, the modification degrades the space efficiency and the time
efficiency of dawgdic.
This drawback may be unacceptable.
In short, base64-encoding may support binary values better than natively
supporting binary keys.
Original comment by [email protected]
on 14 Sep 2012 at 12:16
from dawgdic.
Thanks for all your work on this. Binary keys would be good but base64 works
good enough in practice. So maybe the limitation should be documented somewhere?
Original comment by [email protected]
on 14 Sep 2012 at 12:20
from dawgdic.
Thanks for your comments.
I'll update dawgdic to reject binary keys and then update documentation.
Original comment by [email protected]
on 14 Sep 2012 at 12:40
from dawgdic.
Looks like a good plan.
Original comment by [email protected]
on 14 Sep 2012 at 12:52
from dawgdic.
I've finished the update of dawgdic.
Also, the documentation has been updated.
Original comment by [email protected]
on 15 Sep 2012 at 6:51
- Changed state: WontFix
from dawgdic.
Related Issues (11)
- support for out-of-tree build HOT 1
- testing for out-of-tree builds broken HOT 1
- dawgdic-find crashes
- typo: separater → separator HOT 1
- Tests fail on big-endian machines HOT 4
- Python wrapper HOT 2
- Perfect hashing HOT 3
- Completer segfaults with empty dawgs HOT 2
- dawgdic-build gives `error: failed to insert key:` on certain keys HOT 5
- binary test/dawg-builder-test included in tarball HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dawgdic.