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:
Ursprung
e1464044a7
Commit
7fa80e1759
@ -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);
|
||||
}
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren