Inflater.Inflate Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
Inflate(ByteBuffer) |
Uncompresses bytes into specified buffer. |
Inflate(Byte[]) |
Uncompresses bytes into specified buffer. |
Inflate(Byte[], Int32, Int32) |
Uncompresses bytes into specified buffer. |
Inflate(ByteBuffer)
Uncompresses bytes into specified buffer.
[Android.Runtime.Register("inflate", "(Ljava/nio/ByteBuffer;)I", "GetInflate_Ljava_nio_ByteBuffer_Handler", ApiSince=35)]
public virtual int Inflate (Java.Nio.ByteBuffer? output);
[<Android.Runtime.Register("inflate", "(Ljava/nio/ByteBuffer;)I", "GetInflate_Ljava_nio_ByteBuffer_Handler", ApiSince=35)>]
abstract member Inflate : Java.Nio.ByteBuffer -> int
override this.Inflate : Java.Nio.ByteBuffer -> int
Parameters
- output
- ByteBuffer
the buffer for the uncompressed data
Returns
the actual number of uncompressed bytes
- Attributes
Remarks
Uncompresses bytes into specified buffer. Returns actual number of bytes uncompressed. A return value of 0 indicates that needsInput() or needsDictionary() should be called in order to determine if more input data or a preset dictionary is required. In the latter case, getAdler() can be used to get the Adler-32 value of the dictionary required.
On success, the position of the given output
byte buffer will be advanced by as many bytes as were produced by the operation, which is equal to the number returned by this method. Note that the position of the output
buffer will be advanced even in the event that a DataFormatException
is thrown.
The #getRemaining() remaining byte count will be reduced by the number of consumed input bytes. If the #setInput(ByteBuffer)
method was called to provide a buffer for input, the input buffer's position will be advanced the number of consumed bytes.
These byte totals, as well as the #getBytesRead() total bytes read and the #getBytesWritten() total bytes written values, will be updated even in the event that a DataFormatException
is thrown to reflect the amount of data consumed and produced before the exception occurred.
Added in 11.
Java documentation for java.util.zip.Inflater.inflate(java.nio.ByteBuffer)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
Inflate(Byte[])
Uncompresses bytes into specified buffer.
[Android.Runtime.Register("inflate", "([B)I", "GetInflate_arrayBHandler")]
public virtual int Inflate (byte[]? b);
[Android.Runtime.Register("inflate", "([B)I", "GetInflate_arrayBHandler")]
public virtual int Inflate (byte[]? output);
[<Android.Runtime.Register("inflate", "([B)I", "GetInflate_arrayBHandler")>]
abstract member Inflate : byte[] -> int
override this.Inflate : byte[] -> int
Parameters
- boutput
- Byte[]
the buffer for the uncompressed data
Returns
the actual number of uncompressed bytes
- Attributes
Exceptions
if the underlying stream is corrupted or was not compressed
using a Deflater
.
Remarks
Uncompresses bytes into specified buffer. Returns actual number of bytes uncompressed. A return value of 0 indicates that needsInput() or needsDictionary() should be called in order to determine if more input data or a preset dictionary is required. In the latter case, getAdler() can be used to get the Adler-32 value of the dictionary required.
The #getRemaining() remaining byte count will be reduced by the number of consumed input bytes. If the #setInput(ByteBuffer)
method was called to provide a buffer for input, the input buffer's position will be advanced the number of consumed bytes.
These byte totals, as well as the #getBytesRead() total bytes read and the #getBytesWritten() total bytes written values, will be updated even in the event that a DataFormatException
is thrown to reflect the amount of data consumed and produced before the exception occurred.
Java documentation for java.util.zip.Inflater.inflate(byte[])
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
Inflate(Byte[], Int32, Int32)
Uncompresses bytes into specified buffer.
[Android.Runtime.Register("inflate", "([BII)I", "GetInflate_arrayBIIHandler")]
public virtual int Inflate (byte[]? b, int off, int len);
[Android.Runtime.Register("inflate", "([BII)I", "GetInflate_arrayBIIHandler")]
public virtual int Inflate (byte[]? output, int off, int len);
[<Android.Runtime.Register("inflate", "([BII)I", "GetInflate_arrayBIIHandler")>]
abstract member Inflate : byte[] * int * int -> int
override this.Inflate : byte[] * int * int -> int
Parameters
- boutput
- Byte[]
the buffer for the uncompressed data
- off
- Int32
the start offset of the data
- len
- Int32
the maximum number of uncompressed bytes
Returns
the actual number of uncompressed bytes
- Attributes
Exceptions
if the underlying stream is corrupted or was not compressed
using a Deflater
.
Remarks
Uncompresses bytes into specified buffer. Returns actual number of bytes uncompressed. A return value of 0 indicates that needsInput() or needsDictionary() should be called in order to determine if more input data or a preset dictionary is required. In the latter case, getAdler() can be used to get the Adler-32 value of the dictionary required.
If the #setInput(ByteBuffer)
method was called to provide a buffer for input, the input buffer's position will be advanced by the number of bytes consumed by this operation, even in the event that a DataFormatException
is thrown.
The #getRemaining() remaining byte count will be reduced by the number of consumed input bytes. If the #setInput(ByteBuffer)
method was called to provide a buffer for input, the input buffer's position will be advanced the number of consumed bytes.
These byte totals, as well as the #getBytesRead() total bytes read and the #getBytesWritten() total bytes written values, will be updated even in the event that a DataFormatException
is thrown to reflect the amount of data consumed and produced before the exception occurred.
Java documentation for java.util.zip.Inflater.inflate(byte[], int, int)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.