Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-27 08:30:09 +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 com.github.steveice10.opennbt.tag.builtin.CompoundTag;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
|
import java.io.BufferedInputStream;
|
||||||
import java.io.DataInput;
|
import java.io.DataInput;
|
||||||
import java.io.DataInputStream;
|
import java.io.DataInputStream;
|
||||||
import java.io.DataOutput;
|
import java.io.DataOutput;
|
||||||
@ -93,7 +94,7 @@ public final class BinaryTagIO {
|
|||||||
*/
|
*/
|
||||||
@NotNull
|
@NotNull
|
||||||
public static CompoundTag readCompressedInputStream(final @NotNull InputStream input) throws IOException {
|
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);
|
return readDataInput(dis);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren