• Api Documentation
  • Source Code
Search Results for

    Show / Hide Table of Contents
    • SharpSevenZip
      • ArchiveFileInfo
      • ArchiveProperty
      • CompressionLevel
      • CompressionMethod
      • CompressionMode
      • EventSynchronizationStrategy
      • ExtractFileCallback
      • ICancellable
      • InArchiveFormat
      • LibraryFeature
      • OperationResult
      • OutArchiveFormat
      • SfxModule
      • SharpSevenZipArchiveFormat
      • SharpSevenZipBase
      • SharpSevenZipCompressor
      • SharpSevenZipExtractor
      • SharpSevenZipSfx
      • StreamWithAttributes
      • ZipEncryptionMethod
    • SharpSevenZip.EventArguments
      • ExtractFileCallbackArgs
      • ExtractFileCallbackReason
      • FileInfoEventArgs
      • FileNameEventArgs
      • FileOverwriteEventArgs
      • IntEventArgs
      • OpenEventArgs
      • PercentDoneEventArgs
      • ProgressEventArgs
    • SharpSevenZip.Exceptions
      • CompressionFailedException
      • ExtractionFailedException
      • LzmaException
      • SharpSevenZipArchiveException
      • SharpSevenZipCompressionFailedException
      • SharpSevenZipException
      • SharpSevenZipExtractionFailedException
      • SharpSevenZipInvalidFileNamesException
      • SharpSevenZipLibraryException
      • SharpSevenZipSfxValidationException
    • SharpSevenZip.Lzma
      • LzmaDecodeStream
      • LzmaEncodeStream
    • SharpSevenZip.Sdk
      • CoderPropId
      • ICodeProgress
      • ICoder
    • SharpSevenZip.Sdk.Compression.Lzma
      • Decoder
      • Encoder

    Class LzmaEncodeStream

    The stream which compresses data with LZMA on the fly.

    Inheritance
    object
    MarshalByRefObject
    Stream
    LzmaEncodeStream
    Implements
    IAsyncDisposable
    IDisposable
    Inherited Members
    Stream.Null
    Stream.BeginRead(byte[], int, int, AsyncCallback, object)
    Stream.BeginWrite(byte[], int, int, AsyncCallback, object)
    Stream.Close()
    Stream.CopyTo(Stream)
    Stream.CopyTo(Stream, int)
    Stream.CopyToAsync(Stream)
    Stream.CopyToAsync(Stream, int)
    Stream.CopyToAsync(Stream, int, CancellationToken)
    Stream.CopyToAsync(Stream, CancellationToken)
    Stream.CreateWaitHandle()
    Stream.Dispose()
    Stream.DisposeAsync()
    Stream.EndRead(IAsyncResult)
    Stream.EndWrite(IAsyncResult)
    Stream.FlushAsync()
    Stream.FlushAsync(CancellationToken)
    Stream.ObjectInvariant()
    Stream.Read(Span<byte>)
    Stream.ReadAsync(byte[], int, int)
    Stream.ReadAsync(byte[], int, int, CancellationToken)
    Stream.ReadAsync(Memory<byte>, CancellationToken)
    Stream.ReadAtLeast(Span<byte>, int, bool)
    Stream.ReadAtLeastAsync(Memory<byte>, int, bool, CancellationToken)
    Stream.ReadByte()
    Stream.ReadExactly(byte[], int, int)
    Stream.ReadExactly(Span<byte>)
    Stream.ReadExactlyAsync(byte[], int, int, CancellationToken)
    Stream.ReadExactlyAsync(Memory<byte>, CancellationToken)
    Stream.Synchronized(Stream)
    Stream.ValidateBufferArguments(byte[], int, int)
    Stream.ValidateCopyToArguments(Stream, int)
    Stream.Write(ReadOnlySpan<byte>)
    Stream.WriteAsync(byte[], int, int)
    Stream.WriteAsync(byte[], int, int, CancellationToken)
    Stream.WriteAsync(ReadOnlyMemory<byte>, CancellationToken)
    Stream.WriteByte(byte)
    Stream.CanTimeout
    Stream.ReadTimeout
    Stream.WriteTimeout
    MarshalByRefObject.GetLifetimeService()
    MarshalByRefObject.InitializeLifetimeService()
    MarshalByRefObject.MemberwiseClone(bool)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: SharpSevenZip.Lzma
    Assembly: SharpSevenZip.dll
    Syntax
    public class LzmaEncodeStream : Stream, IAsyncDisposable, IDisposable

    Constructors

    | Edit this page View Source

    LzmaEncodeStream()

    Initializes a new instance of the LzmaEncodeStream class.

    Declaration
    public LzmaEncodeStream()
    | Edit this page View Source

    LzmaEncodeStream(Stream)

    Initializes a new instance of the LzmaEncodeStream class.

    Declaration
    public LzmaEncodeStream(Stream outputStream)
    Parameters
    Type Name Description
    Stream outputStream

    An output stream which supports writing.

    | Edit this page View Source

    LzmaEncodeStream(Stream, int)

    Initializes a new instance of the LzmaEncodeStream class.

    Declaration
    public LzmaEncodeStream(Stream outputStream, int bufferCapacity)
    Parameters
    Type Name Description
    Stream outputStream

    An output stream which supports writing.

    int bufferCapacity

    A buffer size. The bigger size, the better compression.

    | Edit this page View Source

    LzmaEncodeStream(int)

    Initializes a new instance of the LzmaEncodeStream class.

    Declaration
    public LzmaEncodeStream(int bufferCapacity)
    Parameters
    Type Name Description
    int bufferCapacity

    The buffer size. The bigger size, the better compression.

    Properties

    | Edit this page View Source

    CanRead

    Gets a value indicating whether the current stream supports reading.

    Declaration
    public override bool CanRead { get; }
    Property Value
    Type Description
    bool
    Overrides
    Stream.CanRead
    | Edit this page View Source

    CanSeek

    Gets a value indicating whether the current stream supports seeking.

    Declaration
    public override bool CanSeek { get; }
    Property Value
    Type Description
    bool
    Overrides
    Stream.CanSeek
    | Edit this page View Source

    CanWrite

    Gets a value indicating whether the current stream supports writing.

    Declaration
    public override bool CanWrite { get; }
    Property Value
    Type Description
    bool
    Overrides
    Stream.CanWrite
    | Edit this page View Source

    Length

    Gets the length in bytes of the output stream.

    Declaration
    public override long Length { get; }
    Property Value
    Type Description
    long
    Overrides
    Stream.Length
    | Edit this page View Source

    Position

    Gets or sets the position within the output stream.

    Declaration
    public override long Position { get; set; }
    Property Value
    Type Description
    long
    Overrides
    Stream.Position

    Methods

    | Edit this page View Source

    Dispose(bool)

    Releases all unmanaged resources used by LzmaEncodeStream.

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    bool disposing
    Overrides
    Stream.Dispose(bool)
    | Edit this page View Source

    Flush()

    Clears all buffers for this stream and causes any buffered data to be compressed and written.

    Declaration
    public override void Flush()
    Overrides
    Stream.Flush()
    | Edit this page View Source

    Read(byte[], int, int)

    Reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read.

    Declaration
    public override int Read(byte[] buffer, int offset, int count)
    Parameters
    Type Name Description
    byte[] buffer

    An array of bytes.

    int offset

    The zero-based byte offset in buffer at which to begin storing the data read from the current stream.

    int count

    The maximum number of bytes to be read from the current stream.

    Returns
    Type Description
    int

    The total number of bytes read into the buffer.

    Overrides
    Stream.Read(byte[], int, int)
    | Edit this page View Source

    Seek(long, SeekOrigin)

    Sets the position within the current stream.

    Declaration
    public override long Seek(long offset, SeekOrigin origin)
    Parameters
    Type Name Description
    long offset

    A byte offset relative to the origin parameter.

    SeekOrigin origin

    A value of type System.IO.SeekOrigin indicating the reference point used to obtain the new position.

    Returns
    Type Description
    long

    The new position within the current stream.

    Overrides
    Stream.Seek(long, SeekOrigin)
    | Edit this page View Source

    SetLength(long)

    Sets the length of the current stream.

    Declaration
    public override void SetLength(long value)
    Parameters
    Type Name Description
    long value

    The desired length of the current stream in bytes.

    Overrides
    Stream.SetLength(long)
    | Edit this page View Source

    ToDecodeStream()

    Converts the LzmaEncodeStream to the LzmaDecodeStream to read data.

    Declaration
    public LzmaDecodeStream ToDecodeStream()
    Returns
    Type Description
    LzmaDecodeStream
    | Edit this page View Source

    Write(byte[], int, int)

    Writes a sequence of bytes to the current stream and compresses it if necessary.

    Declaration
    public override void Write(byte[] buffer, int offset, int count)
    Parameters
    Type Name Description
    byte[] buffer

    An array of bytes.

    int offset

    The zero-based byte offset in buffer at which to begin storing the data read from the current stream.

    int count

    The maximum number of bytes to be read from the current stream.

    Overrides
    Stream.Write(byte[], int, int)

    Implements

    IAsyncDisposable
    IDisposable
    • Edit this page
    • View Source
    In this article
    Back to top Copyright (C) Markovtsev Vadim 2009, 2010, Jérémy Ansel 2024