aboutsummaryrefslogtreecommitdiff
path: root/azalea-protocol/src/read.rs
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2023-02-13 18:22:42 -0600
committermat <github@matdoes.dev>2023-02-13 18:22:42 -0600
commitedc37cfd4b16abc413733d91810efa774a91963f (patch)
treeca20482714b7fe0731f8fe2187b54a19d836e7d6 /azalea-protocol/src/read.rs
parent37b0cbf0589913b4aab551ae011774e1c9680af7 (diff)
downloadazalea-drasl-edc37cfd4b16abc413733d91810efa774a91963f.tar.xz
fix bad compression on sending long packets
THANKS JAM \SHARP
Diffstat (limited to 'azalea-protocol/src/read.rs')
-rwxr-xr-xazalea-protocol/src/read.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/azalea-protocol/src/read.rs b/azalea-protocol/src/read.rs
index 753717b9..1018c085 100755
--- a/azalea-protocol/src/read.rs
+++ b/azalea-protocol/src/read.rs
@@ -163,7 +163,7 @@ pub enum DecompressionError {
/// Get the decompressed bytes from a packet. It must have been decrypted
/// first.
-fn compression_decoder(
+pub fn compression_decoder(
stream: &mut Cursor<&[u8]>,
compression_threshold: u32,
) -> Result<Vec<u8>, DecompressionError> {
@@ -264,8 +264,7 @@ mod tests {
use crate::packets::game::ClientboundGamePacket;
use std::io::Cursor;
- #[tokio::test]
- async fn test_read_packet() {
+ fn test_read_packet() {
let mut buf: Cursor<&[u8]> = Cursor::new(&[
56, 64, 85, 58, 141, 138, 71, 146, 193, 64, 88, 0, 0, 0, 0, 0, 0, 64, 60, 224, 105, 34,
119, 8, 228, 67, 50, 51, 68, 194, 177, 230, 101, 0, 17, 0,