Skip to content

Commit 7392447

Browse files
committed
Also buffer the NoCompression-compression type
1 parent bb9fc87 commit 7392447

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

core/src/main/java/de/bluecolored/bluemap/core/storage/compression/NoCompression.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,7 @@
2828
import lombok.Getter;
2929
import lombok.RequiredArgsConstructor;
3030

31-
import java.io.IOException;
32-
import java.io.InputStream;
33-
import java.io.OutputStream;
31+
import java.io.*;
3432

3533
@RequiredArgsConstructor
3634
public class NoCompression implements Compression {
@@ -41,12 +39,12 @@ public class NoCompression implements Compression {
4139

4240
@Override
4341
public OutputStream compress(OutputStream out) throws IOException {
44-
return out;
42+
return new BufferedOutputStream(out);
4543
}
4644

4745
@Override
4846
public InputStream decompress(InputStream in) throws IOException {
49-
return in;
47+
return new BufferedInputStream(in);
5048
}
5149

5250
}

0 commit comments

Comments
 (0)