Skip to content

Commit

Permalink
feat(cli): finish compression
Browse files Browse the repository at this point in the history
  • Loading branch information
nothendev committed Oct 4, 2023
1 parent 80ccf9d commit e15a487
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ fn run(_path: String, args: &str) -> Result<(), Report> {

match cli.command {
CliCommand::Help => help(),

CliCommand::Decode(inp) => {
let bytes = read_byte_input(inp)?;

Expand All @@ -59,6 +60,7 @@ fn run(_path: String, args: &str) -> Result<(), Report> {

println!("{:#?}", deserialized);
}

CliCommand::VarInt(inp) => {
let bytes = read_byte_input(inp)?;

Expand All @@ -70,6 +72,7 @@ fn run(_path: String, args: &str) -> Result<(), Report> {
.map_err(err_with_source(|| bytes, Some("varint.bin".to_string())))?
);
}

CliCommand::Nbt(tag, inp) => {
let bytes = read_byte_input(inp)?;
let nbt = Nbt::single
Expand All @@ -78,8 +81,10 @@ fn run(_path: String, args: &str) -> Result<(), Report> {

println!("{nbt:#?}");
}

CliCommand::Decompress(inp) => {
let bytes = read_byte_input(inp)?;

println!(
"{:#x?}",
SerializedPacketCompressed::deserialize.parse(&bytes)?
Expand Down

0 comments on commit e15a487

Please sign in to comment.