Open grdaneault opened 8 years ago
I have some concerns about this pull request, but I have to read more into it. The proper way to translate the input bit stream to the mimic 'options' is using a range encoder, which is not what's being done here. I suspect that the bit method here will not be as efficient as a range encoder.
.gitignore should probably be included in another PR
This implements the steganography feature described in #28. It works as follows:
--encode
) is read and converted to a bit stream0
is represented by the first option1
is represented by the second00
is represented by the first10
is represented by the thirdint(log(len(options), 2))
0
and a1
, but the third option cannot be used to encode data.This method is compatible with the
--me-harder
option (and is, in fact, likely necessary in order to hide information of any substantial size.)In addition, this change also supports mimicking files passed in with the
--source
option rather than onstdin
, and the tests have been updated to use nose, so they can be run usingpython setup.py test