private Article GetArticle(DirectoryEntry DE) { Article A = new Article(); A.DirectoryEntry = DE; ArticleCluster AC = GetArticleCluster(DE.Cluster); A.Body = AC.Blobs[DE.Blob]; return(A); }
private ArticleCluster GetArticleCluster(int ClusterNumber) { ArticleCluster AC = new ArticleCluster(); zimFileBinaryReader.BaseStream.Seek(ClusterPointers [ClusterNumber], SeekOrigin.Begin); AC.Compression = (ArticleCluster.CompressionType)zimFileBinaryReader.ReadByte(); switch (AC.Compression) { case ArticleCluster.CompressionType.LZMA2: AC.PopulateArticle(XZ.OpenXZ(zimFileBinaryReader)); break; default: AC.PopulateArticle(zimFileBinaryReader.BaseStream); break; } return(AC); }
private ArticleCluster GetArticleCluster(int ClusterNumber) { ArticleCluster AC = new ArticleCluster (); zimFileBinaryReader.BaseStream.Seek (ClusterPointers [ClusterNumber], SeekOrigin.Begin); AC.Compression = (ArticleCluster.CompressionType)zimFileBinaryReader.ReadByte (); switch (AC.Compression) { case ArticleCluster.CompressionType.LZMA2: AC.PopulateArticle (XZ.OpenXZ (zimFileBinaryReader)); break; default: AC.PopulateArticle (zimFileBinaryReader.BaseStream); break; } return AC; }