コード例 #1
0
        /* ---------------------------------------------------------------------------------------------------------------------------------- */
        PackFile(MemoryStream packStream)
        {
            m_packStream = packStream;
            m_packStream.Seek(0, SeekOrigin.Begin);

            Contents = PackContents.CreateFromPackFile(m_packStream);
        }
コード例 #2
0
ファイル: PackContents.cs プロジェクト: radwan92/Librarian
        /* ---------------------------------------------------------------------------------------------------------------------------------- */
        public static PackContents CreateFromWdtFile(WdtFile wdtFile)
        {
            Chapter contentsChapter = wdtFile.ChapterList[0];

            byte[] contentDecompressed = new byte [wdtFile.PageSize];
            var    memStream           = new MemoryStream(contentDecompressed);

            WdtDecompressor.DecompressChapter(wdtFile, contentsChapter, memStream);

            PackContents packContents;

            using (var decompressedStream = new MemoryStream(contentDecompressed))
            {
                packContents = new PackContents(decompressedStream);
            }

            return(packContents);
        }