Logo Search packages:      
Sourcecode: djvulibre version File versions  Download package

void DjVmDir0::decode ( ByteStream bs  ) 

Decodes the directory from DIR0# chunk from the specified {ByteStream}

Definition at line 116 of file DjVmDir0.cpp.

References add_file(), ByteStream::read(), ByteStream::read16(), ByteStream::read32(), and ByteStream::read8().

{
   name2file.empty();
   num2file.empty();

   for(int i=bs.read16();i>0;i--)
   {
      GUTF8String name;
      char ch;
      while(bs.read(&ch, 1) && ch) name+=ch;
      bool iff_file=bs.read8()?true:false;
      int offset=bs.read32();
      int size=bs.read32();
      add_file(name, iff_file, offset, size);
   };
}


Generated by  Doxygen 1.6.0   Back to index