3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-12-26 16:12:42 +01:00

Use buffered stream for compressed nbt reading

(See tux' open pr at adventure)
Dieser Commit ist enthalten in:
KennyTV 2020-07-15 12:10:24 +02:00
Ursprung e1464044a7
Commit 7fa80e1759
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 6BE3B555EBC5982B

Datei anzeigen

@ -27,6 +27,7 @@ import com.github.steveice10.opennbt.tag.TagRegistry;
import com.github.steveice10.opennbt.tag.builtin.CompoundTag;
import org.jetbrains.annotations.NotNull;
import java.io.BufferedInputStream;
import java.io.DataInput;
import java.io.DataInputStream;
import java.io.DataOutput;
@ -93,7 +94,7 @@ public final class BinaryTagIO {
*/
@NotNull
public static CompoundTag readCompressedInputStream(final @NotNull InputStream input) throws IOException {
try (final DataInputStream dis = new DataInputStream(new GZIPInputStream(input))) {
try (final DataInputStream dis = new DataInputStream(new BufferedInputStream(new GZIPInputStream(input)))) {
return readDataInput(dis);
}
}