Microsoft.Deployment.Compression.Zip Used to trick a DeflateStream into reading from or writing to a series of (chunked) streams instead of a single steream. Wraps a source stream and calcaluates a CRC over all bytes that are read or written. The CRC algorithm matches that used in the standard ZIP file format. Creates a new CrcStream instance from a source stream. Underlying stream where bytes will be read from or written to. Gets the current CRC over all bytes that have been read or written since this instance was created. Gets the underlying stream that this stream reads from or writes to. Gets a value indicating whether the source stream supports reading. true if the stream supports reading; otherwise, false. Gets a value indicating whether the source stream supports writing. true if the stream supports writing; otherwise, false. Gets a value indicating whether the source stream supports seeking. true if the stream supports seeking; otherwise, false. Gets the length of the source stream. Gets or sets the position of the source stream. Sets the position within the source stream. A byte offset relative to the origin parameter. A value of type SeekOrigin indicating the reference point used to obtain the new position. The new position within the source stream. Note the CRC is only calculated over bytes that are actually read or written, so any bytes skipped by seeking will not contribute to the CRC. Sets the length of the source stream. The desired length of the stream in bytes. Reads a sequence of bytes from the source stream and advances the position within the stream by the number of bytes read. An array of bytes. When this method returns, the buffer contains the specified byte array with the values between offset and (offset + count - 1) replaced by the bytes read from the current source. The zero-based byte offset in buffer at which to begin storing the data read from the current stream. The maximum number of bytes to be read from the current stream. The total number of bytes read into the buffer. This can be less than the number of bytes requested if that many bytes are not currently available, or zero (0) if the end of the stream has been reached. Writes a sequence of bytes to the source stream and advances the current position within this stream by the number of bytes written. An array of bytes. This method copies count bytes from buffer to the current stream. The zero-based byte offset in buffer at which to begin copying bytes to the current stream. The number of bytes to be written to the current stream. Flushes the source stream. Closes the underlying stream. Updates the CRC with a range of bytes that were read or written. Computes a table that speeds up calculation of the CRC. Reflects the ordering of certain number of bits. For exmample when reflecting one byte, bit one is swapped with bit eight, bit two with bit seven, etc. Identifies the compression method or "algorithm" used for a single file within a zip archive. Proprietary zip implementations may define additional compression methods outside of those included here. The file is stored (no compression) The file is Shrunk The file is Reduced with compression factor 1 The file is Reduced with compression factor 2 The file is Reduced with compression factor 3 The file is Reduced with compression factor 4 The file is Imploded The file is Deflated; the most common and widely-compatible form of zip compression. The file is Deflated using the enhanced Deflate64 method. The file is compressed using the BZIP2 algorithm. The file is compressed using the LZMA algorithm. The file is compressed using the PPMd algorithm. Exception class for zip operations. Creates a new ZipException with a specified error message and a reference to the inner exception that is the cause of this exception. The message that describes the error. The exception that is the cause of the current exception. If the innerException parameter is not a null reference (Nothing in Visual Basic), the current exception is raised in a catch block that handles the inner exception. Creates a new ZipException with a specified error message. The message that describes the error. Creates a new ZipException. Initializes a new instance of the ZipException class with serialized data. The SerializationInfo that holds the serialized object data about the exception being thrown. The StreamingContext that contains contextual information about the source or destination. Sets the SerializationInfo with information about the exception. The SerializationInfo that holds the serialized object data about the exception being thrown. The StreamingContext that contains contextual information about the source or destination. Engine capable of packing and unpacking archives in the zip format. Registers a delegate that can create a warpper stream for compressing or uncompressing the data of a source stream. Compression method being registered. Indicates registration for ether compress or decompress mode. Delegate being registered. For compression, the delegate accepts a stream that writes to the archive and returns a wrapper stream that compresses bytes as they are written. For decompression, the delegate accepts a stream that reads from the archive and returns a wrapper stream that decompresses bytes as they are read. This wrapper stream model follows the design used by System.IO.Compression.DeflateStream, and indeed that class is used to implement the Deflate compression method by default. To unregister a delegate, call this method again and pass null for the delegate parameter. When the ZipEngine class is initialized, the Deflate compression method is automatically registered like this: ZipEngine.RegisterCompressionStreamCreator( ZipCompressionMethod.Deflate, CompressionMode.Compress, delegate(Stream stream) { return new DeflateStream(stream, CompressionMode.Compress, true); }); ZipEngine.RegisterCompressionStreamCreator( ZipCompressionMethod.Deflate, CompressionMode.Decompress, delegate(Stream stream) { return new DeflateStream(stream, CompressionMode.Decompress, true); }); Creates a new instance of the zip engine. Gets the comment from the last-examined archive, or sets the comment to be added to any created archives. Checks whether a Stream begins with a header that indicates it is a valid archive file. Stream for reading the archive file. True if the stream is a valid zip archive (with no offset); false otherwise. Gets the offset of an archive that is positioned 0 or more bytes from the start of the Stream. A stream for reading the archive. The offset in bytes of the archive, or -1 if no archive is found in the Stream. The archive must begin on a 4-byte boundary. Gets information about files in a zip archive or archive chain. A context interface to handle opening and closing of archive and file streams. A predicate that can determine which files to process, optional. Information about files in the archive stream. The archive provided by the stream context is not valid. The predicate takes an internal file path and returns true to include the file or false to exclude it. Reads all the file headers from the central directory in the main archive. Locates and reads the end of central directory record near the end of the archive. Creates a zip archive or chain of zip archives. A context interface to handle opening and closing of archive and file streams. An array of file lists. Each list is compressed into one stream in the archive. The maximum number of bytes for one archive before the contents are chained to the next archive, or zero for unlimited archive size. The archive could not be created. The stream context implementation may provide a mapping from the file paths within the archive to the external file paths. Moves to the next archive in the sequence if necessary. Adds one file to a zip archive in the process of being created. Writes compressed bytes of one file to the archive, keeping track of the CRC and number of bytes written. Extracts files from a zip archive or archive chain. A context interface to handle opening and closing of archive and file streams. An optional predicate that can determine which files to process. The archive provided by the stream context is not valid. The predicate takes an internal file path and returns true to include the file or false to exclude it. Unpacks a single file from an archive or archive chain. Compares two internal file paths while ignoring case and slash differences. The first path to compare. The second path to compare. True if the paths are equivalent. Decompresses bytes for one file from an archive or archive chain, checking the crc at the end. Object representing a compressed file within a zip package; provides operations for getting the file properties and extracting the file. Creates a new ZipFileInfo object representing a file within a zip in a specified path. An object representing the zip archive containing the file. The path to the file within the zip archive. Usually, this is a simple file name, but if the zip archive contains a directory structure this may include the directory. Creates a new ZipFileInfo object with all parameters specified, used internally when reading the metadata out of a zip archive. The internal path and name of the file in the zip archive. The zip archive number where the file starts. The stored attributes of the file. The stored last write time of the file. The uncompressed size of the file. The compressed size of the file. Compression algorithm used for this file. Initializes a new instance of the ZipFileInfo class with serialized data. The SerializationInfo that holds the serialized object data about the exception being thrown. The StreamingContext that contains contextual information about the source or destination. Gets the compressed size of the file in bytes. Gets the method used to compress this file. Sets the SerializationInfo with information about the archive. The SerializationInfo that holds the serialized object data. The StreamingContext that contains contextual information about the source or destination. Object representing a zip file on disk; provides access to file-based operations on the zip file. Generally, the methods on this class are much easier to use than the stream-based interfaces provided by the class. Creates a new CabinetInfo object representing a zip file in a specified path. The path to the zip file. When creating a zip file, this file does not necessarily exist yet. Initializes a new instance of the CabinetInfo class with serialized data. The SerializationInfo that holds the serialized object data about the exception being thrown. The StreamingContext that contains contextual information about the source or destination. Creates a compression engine that does the low-level work for this object. A new instance. Each instance will be d immediately after use. Gets information about the files contained in the archive. A list of objects, each containing information about a file in the archive. Gets information about the certain files contained in the archive file. The search string, such as "*.txt". A list of objects, each containing information about a file in the archive. Distribution specific strings. News URL for the distribution. Short product name for the distribution. Support URL for the distribution. Telemetry URL format for the distribution. VS Extensions Landing page Url for the distribution.