Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# binary-utils
A binary system to be used for RakNet protocol.
A binary system to be used for Bedrock & RakNet protocol.

## Usage

Expand All @@ -17,12 +17,12 @@ use binary_utils::binary::Stream;
fn main() {
let mut stream = Stream::new(vec![1, 2], 0);
stream.put_byte(128);
stream.put_l_triad(12345);
stream.put_i24_le(12345);

let _ = stream.get_byte(); // first byte -> 1
let _ = stream.get_byte(); // second byte -> 2
let _ = stream.get_byte(); // third byte -> 128
let triad_num = stream.get_l_triad(); // triad number -> 12345
let triad_num = stream.get_i24_le(); // triad number -> 12345

println!("{}", triad_num); // 12345
println!("{:?}", stream.get_buffer()); // [1, 2, 128, 57, 48, 0]
Expand Down
Loading