andylokandy / Byte
Licence: mit
A low-level, zero-copy, panic-free, binary serializer and deserializer. (parser and encoder)
Stars: ✭ 29
Programming Languages
rust
11053 projects
Projects that are alternatives of or similar to Byte
Ciscoconfparse
Parse, Audit, Query, Build, and Modify Cisco IOS-style configurations. Python Infrastructure as Code (IaC) for Cisco IOS (and other vendors).
Stars: ✭ 562 (+1837.93%)
Mutual labels: parse
Micromark
the smallest commonmark compliant markdown parser that exists; new basis for @unifiedjs (hundreds of projects w/ billions of downloads for dealing w/ content)
Stars: ✭ 793 (+2634.48%)
Mutual labels: parse
Parse Code Context
Parse code context in a single line of javascript, for functions, variable declarations, methods, prototype properties, prototype methods etc.
Stars: ✭ 7 (-75.86%)
Mutual labels: parse
Leasot
Parse and output TODOs and FIXMEs from comments in your files
Stars: ✭ 729 (+2413.79%)
Mutual labels: parse
Apifier
Apifier is a very simple HTML parser written in Python based on CSS selectors
Stars: ✭ 5 (-82.76%)
Mutual labels: parse
Librini
Rini is a tiny, non-libc dependant, .ini file parser programmed from scratch in C99.
Stars: ✭ 25 (-13.79%)
Mutual labels: parse
Cortex M Rtic
Real-Time Interrupt-driven Concurrency (RTIC) framework for ARM Cortex-M microcontrollers
Stars: ✭ 623 (+2048.28%)
Mutual labels: no-std
Unitsnet
Makes life working with units of measurement just a little bit better.
Stars: ✭ 641 (+2110.34%)
Mutual labels: parse
Rdf Dereference.js
Dereference any URL for its RDF contents
Stars: ✭ 18 (-37.93%)
Mutual labels: parse
Remarkable
Markdown parser, done right. Commonmark support, extensions, syntax plugins, high speed - all in one. Gulp and metalsmith plugins available. Used by Facebook, Docusaurus and many others! Use https://github.com/breakdance/breakdance for HTML-to-markdown conversion. Use https://github.com/jonschlinkert/markdown-toc to generate a table of contents.
Stars: ✭ 5,252 (+18010.34%)
Mutual labels: parse
Xargo
The sysroot manager that lets you build and customize `std`
Stars: ✭ 841 (+2800%)
Mutual labels: no-std
Chatistics
💬 Python scripts to parse Messenger, Hangouts, WhatsApp and Telegram chat logs into DataFrames.
Stars: ✭ 814 (+2706.9%)
Mutual labels: parse
Vue Filter Date Parse
Simple date parsing filter for Vue.js
Stars: ✭ 24 (-17.24%)
Mutual labels: parse
Byte
A low-level, zero-copy and panic-free serializer and deserializer for binary.
Documentation
Usage
First, add the following to your Cargo.toml
:
[dependencies]
byte = "0.2"
Next, add this to your crate root:
extern crate byte;
Byte
is no_std
library; it can directly be used in a #![no_std]
situation or crate.
Overview
Byte
is designed to encode or decode binary data in a fast and low-level way.
A classical use case is I2C communication en/decoding.
Byte
provides two core traits TryRead
and TryWrite
.
Types that implement these traits can be serialize into or deserialize from byte slices.
The library is meant to be simple, and it will always be.
Example
use byte::*;
let bytes: &[u8] = &[0xde, 0xad, 0xbe, 0xef];
let offset = &mut 0;
let num = bytes.read_with::<u32>(offset, BE).unwrap();
assert_eq!(num, 0xdeadbeef);
assert_eq!(*offset, 4);
use byte::*;
use byte::ctx::{Str, NULL};
let bytes: &[u8] = b"hello, world!\0dump";
let offset = &mut 0;
let str = bytes.read_with::<&str>(offset, Str::Delimiter(NULL)).unwrap();
assert_eq!(str, "hello, world!");
assert_eq!(*offset, 14);
Contribution
All kinds of contribution are welcomed.
- Issus. Feel free to open an issue when you find typos, bugs, or have any question.
- Pull requests. New collection, better implementation, more tests, more documents and typo fixes are all welcomed.
License
Licensed under MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].