Skip to content

Commit e7ae434

Browse files
authored
Merge pull request #1 from ismaileke/advanced-binary
Regulated Binary System
2 parents 7b17695 + b46f633 commit e7ae434

3 files changed

Lines changed: 263 additions & 288 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# binary-utils
2-
A binary system to be used for RakNet protocol.
2+
A binary system to be used for Bedrock & RakNet protocol.
33

44
## Usage
55

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

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

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

0 commit comments

Comments
 (0)