src/AnvilPacker/Data/NBT.cs
/// <summary> Writes a GZIP compressed tag. </summary>
Writes a GZIP compressed tag.
Writes a GZIP compressed tag .
public static byte[] Compress(CompoundTag tag)
        {
            using var mem = new MemoryStream();
            using (var dos = new DataWriter(new GZipStream(mem, CompressionMode.Compress, true))) {
                Write(tag, dos);
            }
            return mem.ToArray();
        }
public static byte [ ] Compress ( CompoundTag tag ) { using var mem = new MemoryStream ( ) ; using ( var dos = new DataWriter ( new GZipStream ( mem , CompressionMode . Compress , true ) ) ) { Write ( tag , dos ) ; } return mem . ToArray ( ) ; }
Writes a GZIP compressed tag.
Writes a GZIP compressed tag .
tag
CompoundTag