Skip to content
This repository has been archived by the owner on May 2, 2020. It is now read-only.

4lDO2/sbp-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sbp - a simple and compact binary parsing crate

Crates.io Docs.rs Build Status

While libraries such as nom and cookie-factory can provide good parsing and serializing, they require a lot of boilerplate code. If your goal is to simply parse a structure like you would do it in C, you would need to first declare the struct, then use the parse macro which requires writing every field twice, and a serialize macro which requires writing every field once again. This is fine for a few simple structures, but in a filesystem implementation, for example, you might end up declaring over 100 structs. In that case a more compact parsing crate would be useful. On the other hand, transmuting raw bytes into the structs doesn't support configurable endianness, and might be undefined behavior. sbp provides a quick-and-dirty way to compactly define binary structs for parsing and serializing.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

About

A simple binary parser that doesn't require too much boilerplate code

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages