gkappler / CombinedParsers.jl

Compiled parser combinators and regular expressions in pure julia
MIT License
78 stars 10 forks source link

Parsing binary formats #4

Closed rick2047 closed 4 years ago

rick2047 commented 4 years ago

Is there a way to use this to parse binary based formats (similar to BSON or MsgPack?). From what I understand it seems like this library works only on purely text format, can't find a way to make a parser which takes in bytes/uint8

gkappler commented 4 years ago

That is possible. I spent some time with bson, will finish testing and provide it as an example in the manual for parsing Vector{UInt8}. https://github.com/JuliaIO/BSON.jl is probably more optimized though.

gkappler commented 4 years ago

I just provided a bson Vector{UInt8} example in the documentation. To work with binary data please update to CombinedParsers 0.1.2, as I removed some type restrictions.

rick2047 commented 4 years ago

This seems like something I can look into. Thanks a lot. I will close the issue.