/// <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(); } }
/// <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(); }
/// <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(); }