Example #1
0
        private void CreateZip64EndOfCentralDirectoryBlock()
        {
            int index = this._blockList.IndexOf(this.Zip64EndOfCentralDirectoryLocatorBlock);

            this._zip64EndOfCentralDirectoryBlock = ZipIOZip64EndOfCentralDirectoryBlock.CreateNew(this);
            this.InsertBlock(index, this._zip64EndOfCentralDirectoryBlock);
        }
Example #2
0
        internal static ZipIOZip64EndOfCentralDirectoryBlock SeekableLoad(ZipIOBlockManager blockManager)
        {
            long offset = blockManager.Zip64EndOfCentralDirectoryLocatorBlock.OffsetOfZip64EndOfCentralDirectoryRecord;
            ZipIOZip64EndOfCentralDirectoryBlock block = new ZipIOZip64EndOfCentralDirectoryBlock(blockManager);

            blockManager.Stream.Seek(offset, SeekOrigin.Begin);
            block.ParseRecord(blockManager.BinaryReader, offset);
            return(block);
        }
Example #3
0
        internal static ZipIOZip64EndOfCentralDirectoryBlock CreateNew(ZipIOBlockManager blockManager)
        {
            ZipIOZip64EndOfCentralDirectoryBlock block = new ZipIOZip64EndOfCentralDirectoryBlock(blockManager);

            block._size      = 0L;
            block._offset    = 0L;
            block._dirtyFlag = false;
            block.InitializeFromEndOfCentralDirectory(blockManager.EndOfCentralDirectoryBlock);
            return(block);
        }
        internal static ZipIOCentralDirectoryBlock SeekableLoad(ZipIOBlockManager blockManager)
        {
            ZipIOZip64EndOfCentralDirectoryBlock block = blockManager.Zip64EndOfCentralDirectoryBlock;

            blockManager.Stream.Seek(block.OffsetOfStartOfCentralDirectory, SeekOrigin.Begin);
            ZipIOCentralDirectoryBlock block2 = new ZipIOCentralDirectoryBlock(blockManager);

            block2.ParseRecord(blockManager.BinaryReader, block.OffsetOfStartOfCentralDirectory, block.TotalNumberOfEntriesInTheCentralDirectory, block.SizeOfCentralDirectory);
            return(block2);
        }
Example #5
0
 private void LoadZip64EndOfCentralDirectoryBlock()
 {
     this._zip64EndOfCentralDirectoryBlock = ZipIOZip64EndOfCentralDirectoryBlock.SeekableLoad(this);
     this.MapBlock(this._zip64EndOfCentralDirectoryBlock);
 }