Skip to content

Commit

Permalink
Also buffer the NoCompression-compression type
Browse files Browse the repository at this point in the history
  • Loading branch information
TBlueF committed Dec 13, 2024
1 parent bb9fc87 commit 7392447
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@
import lombok.Getter;
import lombok.RequiredArgsConstructor;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.*;

@RequiredArgsConstructor
public class NoCompression implements Compression {
Expand All @@ -41,12 +39,12 @@ public class NoCompression implements Compression {

@Override
public OutputStream compress(OutputStream out) throws IOException {
return out;
return new BufferedOutputStream(out);
}

@Override
public InputStream decompress(InputStream in) throws IOException {
return in;
return new BufferedInputStream(in);
}

}

0 comments on commit 7392447

Please sign in to comment.