示例#1
0
        /// <summary>
        /// Reads in the chunk data
        /// </summary>
        /// <param name="reader"></param>
        private void ReadChunkHeader(DjvuReader reader)
        {
            ChunkID = reader.ReadUTF8String(4);

            if (IsSubFormChunk == false)
            {
                Length = reader.ReadInt32MSB();
            }
        }
示例#2
0
        /// <summary>
        /// Reads the data for the components
        /// </summary>
        /// <param name="reader"></param>
        /// <param name="count"></param>
        private void ReadComponentData(DjvuReader reader, int count)
        {
            List <DirmComponent> components = new List <DirmComponent>();

            // Read the offsets for the components
            for (int x = 0; x < count; x++)
            {
                int offset = reader.ReadInt32MSB();
                components.Add(new DirmComponent(offset));
            }

            _dataLocation            = reader.Position;
            _isInitialized           = false;
            _compressedSectionLength = (int)(Length - (reader.Position - Offset - 12));

            // Skip the bytes since this section is delayed read
            reader.Position += _compressedSectionLength;

            _components = components.ToArray();
        }
示例#3
0
        /// <summary>
        /// Reads the data for the components
        /// </summary>
        /// <param name="reader"></param>
        /// <param name="count"></param>
        private void ReadComponentData(DjvuReader reader, int count)
        {
            List<DirmComponent> components = new List<DirmComponent>();

            // Read the offsets for the components
            for (int x = 0; x < count; x++)
            {
                int offset = reader.ReadInt32MSB();
                components.Add(new DirmComponent(offset));
            }

            _dataLocation = reader.Position;
            _isInitialized = false;
            _compressedSectionLength = (int)(Length - (reader.Position - Offset - 12));

            // Skip the bytes since this section is delayed read
            reader.Position += _compressedSectionLength;

            _components = components.ToArray();
        }