// Path: src/main/java/org/inventivetalent/nbt/stream/NBTInputStream.java
// public class NBTInputStream implements AutoCloseable {
// 
// 	public static final Charset UTF_8 = Charset.forName("UTF-8");
// 
// 	private final DataInputStream in;
// 
// 	public NBTInputStream(InputStream inputStream, boolean gzip) throws IOException {
// 		if (gzip) {
// 			this.in = new DataInputStream(new GZIPInputStream(inputStream));
// 		} else {
// 			this.in = new DataInputStream(inputStream);
// 		}
// 	}
// 
// 	public NBTInputStream(InputStream inputStream) throws IOException {
// 		this.in = new DataInputStream(inputStream);
// 	}
// 
// 	public NBTInputStream(DataInputStream dataInputStream) {
// 		this.in = dataInputStream;
// 	}
// 
// 	public static NBTInputStream optionalGzip(InputStream inputStream) throws IOException {
// 		try {
// 			return new NBTInputStream(new DataInputStream(new GZIPInputStream(inputStream)));
// 		} catch (ZipException e) {
// 			return new NBTInputStream(new DataInputStream(inputStream));
// 		}
// 	}
// 
// 	public NBTTag readNBTTag() throws IOException {
// 		return readNBTTag(0);
// 	}
// 
// 	public NBTTag readNBTTag(int depth) throws IOException {
// 		int tagType = in.readByte() & 0xFF;
// 		String tagName = "";
// 		if (tagType != TAG_END) {
// 			int length = in.readShort() & 0xFFFF;
// 			byte[] nameBytes = new byte[length];
// 			in.readFully(nameBytes);
// 			tagName = new String(nameBytes, UTF_8);
// 		}
// 
// 		return readTagContent(tagType, tagName, depth);
// 	}
// 
// 	public NBTTag readTagContent(int tagType, String tagName, int depth) throws IOException {
// 		try {
// 			NBTTag nbtTag = NBTTag.forType(tagType).getConstructor(String.class).newInstance(tagName);
// 			nbtTag.read(this, in, depth);
// 			return nbtTag;
// 		} catch (ReflectiveOperationException e) {
// 			throw new IOException("Could not instantiate NBTTag class for type " + tagType + "'" + tagName + "'", e);
// 		}
// 	}
// 
// 	@Override
// 	public void close() throws Exception {
// 		in.close();
// 	}
// }
// 
// Path: src/main/java/org/inventivetalent/nbt/stream/NBTOutputStream.java
// public class NBTOutputStream implements AutoCloseable {
// 
// 	public static final Charset UTF_8 = Charset.forName("UTF-8");
// 
// 	private final DataOutputStream out;
// 
// 	public NBTOutputStream(OutputStream outputStream, boolean gzip) throws IOException {
// 		if (gzip) {
// 			this.out = new DataOutputStream(new GZIPOutputStream(outputStream));
// 		} else {
// 			this.out = new DataOutputStream(outputStream);
// 		}
// 	}
// 
// 	public NBTOutputStream(OutputStream outputStream) throws IOException {
// 		this.out = new DataOutputStream(outputStream);
// 	}
// 
// 	public NBTOutputStream(DataOutputStream dataOutputStream) {
// 		this.out = dataOutputStream;
// 	}
// 
// 	public void writeTag(NBTTag tag) throws IOException {
// 		String name = tag.getName();
// 		byte[] nameBytes = name.getBytes(UTF_8);
// 
// 		out.writeByte(tag.getTypeId());
// 		out.writeShort(nameBytes.length);
// 		out.write(nameBytes);
// 
// 		writeTagContent(tag);
// 	}
// 
// 	public void writeTagContent(NBTTag tag) throws IOException {
// 		tag.write(this, out);
// 	}
// 
// 	@Override
// 	public void close() throws Exception {
// 		out.close();
// 	}
// }


import com.google.common.primitives.Longs;
import com.google.gson.JsonArray;
import com.google.gson.JsonPrimitive;
import org.apache.commons.lang.ArrayUtils;
import org.inventivetalent.nbt.stream.NBTInputStream;
import org.inventivetalent.nbt.stream.NBTOutputStream;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;

	@Override
	public void read(NBTInputStream nbtIn, DataInputStream in, int depth) throws IOException {
		long[] longs = new long[in.readInt()];
		for (int i = 0; i < longs.length; i++) {
			longs[i] = in.readLong();
		}
		value = longs;
	}

	@Override
	public void write(NBTOutputStream nbtOut, DataOutputStream out) throws IOException {
		out.writeInt(value.length);
		for (int i = 0; i < value.length; i++) {
			out.writeLong(value[i]);
		}
	}

	@Override
	public int getTypeId() {
		return TagID.TAG_LONG_ARRAY;
	}

	@Override
	public String getTypeName() {
		return "TAG_Long_Array";
	}

	@Override
	public Iterator<Long> iterator() {
// Path: src/main/java/org/inventivetalent/nbt/stream/NBTInputStream.java
// public class NBTInputStream implements AutoCloseable {
// 
// 	public static final Charset UTF_8 = Charset.forName("UTF-8");
// 
// 	private final DataInputStream in;
// 
// 	public NBTInputStream(InputStream inputStream, boolean gzip) throws IOException {
// 		if (gzip) {
// 			this.in = new DataInputStream(new GZIPInputStream(inputStream));
// 		} else {
// 			this.in = new DataInputStream(inputStream);
// 		}
// 	}
// 
// 	public NBTInputStream(InputStream inputStream) throws IOException {
// 		this.in = new DataInputStream(inputStream);
// 	}
// 
// 	public NBTInputStream(DataInputStream dataInputStream) {
// 		this.in = dataInputStream;
// 	}
// 
// 	public static NBTInputStream optionalGzip(InputStream inputStream) throws IOException {
// 		try {
// 			return new NBTInputStream(new DataInputStream(new GZIPInputStream(inputStream)));
// 		} catch (ZipException e) {
// 			return new NBTInputStream(new DataInputStream(inputStream));
// 		}
// 	}
// 
// 	public NBTTag readNBTTag() throws IOException {
// 		return readNBTTag(0);
// 	}
// 
// 	public NBTTag readNBTTag(int depth) throws IOException {
// 		int tagType = in.readByte() & 0xFF;
// 		String tagName = "";
// 		if (tagType != TAG_END) {
// 			int length = in.readShort() & 0xFFFF;
// 			byte[] nameBytes = new byte[length];
// 			in.readFully(nameBytes);
// 			tagName = new String(nameBytes, UTF_8);
// 		}
// 
// 		return readTagContent(tagType, tagName, depth);
// 	}
// 
// 	public NBTTag readTagContent(int tagType, String tagName, int depth) throws IOException {
// 		try {
// 			NBTTag nbtTag = NBTTag.forType(tagType).getConstructor(String.class).newInstance(tagName);
// 			nbtTag.read(this, in, depth);
// 			return nbtTag;
// 		} catch (ReflectiveOperationException e) {
// 			throw new IOException("Could not instantiate NBTTag class for type " + tagType + "'" + tagName + "'", e);
// 		}
// 	}
// 
// 	@Override
// 	public void close() throws Exception {
// 		in.close();
// 	}
// }
// 
// Path: src/main/java/org/inventivetalent/nbt/stream/NBTOutputStream.java
// public class NBTOutputStream implements AutoCloseable {
// 
// 	public static final Charset UTF_8 = Charset.forName("UTF-8");
// 
// 	private final DataOutputStream out;
// 
// 	public NBTOutputStream(OutputStream outputStream, boolean gzip) throws IOException {
// 		if (gzip) {
// 			this.out = new DataOutputStream(new GZIPOutputStream(outputStream));
// 		} else {
// 			this.out = new DataOutputStream(outputStream);
// 		}
// 	}
// 
// 	public NBTOutputStream(OutputStream outputStream) throws IOException {
// 		this.out = new DataOutputStream(outputStream);
// 	}
// 
// 	public NBTOutputStream(DataOutputStream dataOutputStream) {
// 		this.out = dataOutputStream;
// 	}
// 
// 	public void writeTag(NBTTag tag) throws IOException {
// 		String name = tag.getName();
// 		byte[] nameBytes = name.getBytes(UTF_8);
// 
// 		out.writeByte(tag.getTypeId());
// 		out.writeShort(nameBytes.length);
// 		out.write(nameBytes);
// 
// 		writeTagContent(tag);
// 	}
// 
// 	public void writeTagContent(NBTTag tag) throws IOException {
// 		tag.write(this, out);
// 	}
// 
// 	@Override
// 	public void close() throws Exception {
// 		out.close();
// 	}
// }


// Path: src/main/java/org/inventivetalent/nbt/LongArrayTag.java
import com.google.common.primitives.Longs;
import com.google.gson.JsonArray;
import com.google.gson.JsonPrimitive;
import org.apache.commons.lang.ArrayUtils;
import org.inventivetalent.nbt.stream.NBTInputStream;
import org.inventivetalent.nbt.stream.NBTOutputStream;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;


	@Override
	public void read(NBTInputStream nbtIn, DataInputStream in, int depth) throws IOException {
		long[] longs = new long[in.readInt()];
		for (int i = 0; i < longs.length; i++) {
			longs[i] = in.readLong();
		}
		value = longs;
	}

	@Override
	public void write(NBTOutputStream nbtOut, DataOutputStream out) throws IOException {
		out.writeInt(value.length);
		for (int i = 0; i < value.length; i++) {
			out.writeLong(value[i]);
		}
	}

	@Override
	public int getTypeId() {
		return TagID.TAG_LONG_ARRAY;
	}

	@Override
	public String getTypeName() {
		return "TAG_Long_Array";
	}

	@Override
	public Iterator<Long> iterator() {
		return Longs.asList(value).iterator();