static read(buffer) {
		var reader = new BinaryReader(buffer)

		var validation = reader.getUint8()

		if (validation !== BinaryWriter.validationByte) {
			throw "validation byte doesn't match."
		}

		var tocLength = reader.getUint32()
		var tocString = reader.getString(tocLength)
		var toc = JSON.parse(tocString)
		var contents = []

		for (var i = 0; i < toc.length; i++) {
			switch (toc[i].t) {
				case 's': contents.push(reader.getString(toc[i].l)); break
				case 't': contents.push(new (typeof window !== 'undefined' ? window : global)[toc[i].i](reader.getBuffer(toc[i].l))); break
				case 'b': contents.push(reader.getBuffer(toc[i].l)); break
			}

			if (toc[i]['o'] === 1) {
				contents[i] = JSON.parse(contents[i]);
			}
		}

		return contents
	}
Returns the contents read from the array buffer
@param  {ArrayBuffer} buffer
@return {array}