2012-08-08 12:27:36 +00:00
|
|
|
Overview
|
|
|
|
========
|
2012-08-06 18:49:56 +00:00
|
|
|
|
|
|
|
POC to compile a data set into a modified radix tree,
|
|
|
|
and applying huffman encoding.
|
|
|
|
|
|
|
|
|
2012-08-08 12:27:36 +00:00
|
|
|
Usage
|
|
|
|
=====
|
2012-08-06 18:49:56 +00:00
|
|
|
|
|
|
|
Take in an v1 x509 certificate, and extract the
|
|
|
|
content sets, output them to newline delimited output
|
|
|
|
|
2012-08-06 20:47:47 +00:00
|
|
|
`$> ruby ./thing.rb d this-cert.pem`
|
2012-08-06 18:49:56 +00:00
|
|
|
|
2012-08-06 20:47:47 +00:00
|
|
|
This would produce a file named 'this-cert.txt'
|
2012-08-06 21:40:57 +00:00
|
|
|
|
|
|
|
To see this txt list, in the tree format, do:
|
|
|
|
|
|
|
|
`$> ruby ./thing.rb p this-cert.txt | less`
|
|
|
|
|
|
|
|
Process this output to generate the compiled dictionary output
|
2012-08-06 18:49:56 +00:00
|
|
|
|
2012-08-06 20:47:47 +00:00
|
|
|
`$> ruby ./thing.rb c this-cert.txt`
|
2012-08-06 18:49:56 +00:00
|
|
|
|
|
|
|
This would produce a file named 'this-cert.bin'
|
|
|
|
Then, the unpack the binary with:
|
|
|
|
|
2012-08-06 18:51:56 +00:00
|
|
|
`$> ./unpack this-cert.bin`
|
2012-08-06 21:40:57 +00:00
|
|
|
or
|
|
|
|
`$> ruby ./unpack.rb this-cert.bin`
|
2012-08-06 18:49:56 +00:00
|
|
|
|
|
|
|
|
2012-08-06 21:04:30 +00:00
|
|
|
The 'thing.rb' supports a "-v" verbose flag.
|
|
|
|
|
2012-08-08 12:27:36 +00:00
|
|
|
Code compiles
|
|
|
|
=============
|
2012-08-06 18:49:56 +00:00
|
|
|
|
|
|
|
To compile the 'unpack' command, just run `make`.
|
|
|
|
( this requires make, gcc, and zlib-devel)
|
|
|
|
|