private DTElement ReadItem(ExtendedBinaryReader input)
        {
            var offset    = input.ReadUInt16();
            var returnPos = input.Position;

            input.Seek(offset, SeekOrigin.Begin);
            var id      = input.ReadUInt16();
            var unknown = input.ReadBytes(UnknownSize);

            var item = new DTElement(NumStringsPerItem)
            {
                Id = id, Unknown = unknown
            };

            for (var i = 0; i < NumStringsPerItem; i++)
            {
                var str = ReadSubtitle(input);
                item.Strings.Add(str);
            }

            input.Seek(returnPos, SeekOrigin.Begin);
            return(item);
        }
        private long WriteItem(ExtendedBinaryWriter output, IList <Subtitle> subtitles, DTElement item, long outputOffset)
        {
            output.Write((ushort)outputOffset);
            var returnPos = output.Position;

            output.Seek(outputOffset, SeekOrigin.Begin);
            output.Write(item.Id);
            output.Write(item.Unknown);

            var currentOffset = outputOffset + 2 + UnknownSize + 2 * NumStringsPerItem;

            foreach (var str in item.Strings)
            {
                var subtitle = subtitles.First(x => x.Offset == str.Offset);
                currentOffset = WriteSubtitle(output, subtitle, currentOffset, true);
            }

            output.Seek(returnPos, SeekOrigin.Begin);

            return(currentOffset);
        }