K4os.Compression.LZ4 Action performed by encoder using FlushAndEncode method. Nothing has happened, most likely loading 0 bytes. Some bytes has been loaded into encoder. Compression was not possible so bytes has been copied. Compression succeeded. Interface of LZ4 decoder used by LZ4 streams. Block size. Bytes already decoded and available to be read. Always smaller than Decodes previously compressed block and caches decompressed block in decoder. Returns number of bytes decoded. These bytes can be read with . Points to compressed block. Length of compressed block. Size of the block. Value 0 indicates default block size. Number of decoded bytes. Inject already decompressed block and caches it in decoder. Used with uncompressed-yet-chained blocks and pre-made dictionaries. These bytes can be read with . Points to uncompressed block. Length of uncompressed block. Number of decoded bytes. Reads previously decoded bytes. Please note, should be negative number, pointing to bytes before current head. Buffer to write to. Offset in source buffer relatively to current head. Please note, it should be negative value. Number of bytes to read. Peeks at previously decoded bytes. Please note, should be negative number, pointing to bytes before current head. Offset in source buffer relatively to current head. Please note, it should be negative value. Interface of LZ4 encoder used by LZ4 streams. Block size. Number of bytes read for compression. Always smaller than Adds bytes to internal buffer. Increases Source buffer. Source buffer length. Number of bytes topped up. If this function returns 0 it means that buffer is full ( equals ) and should be called to flush it. Encodes bytes in internal buffer (see: , ). If is true then if encoded buffer is bigger than source buffer source bytes are copied instead. In such case returned length is negative. Target buffer. Target buffer length. Indicates if copying is allowed. Length of encoded buffer. Negative if bytes are just copied. LZ4 decoder used with independent blocks mode. Please note, that it will fail if input data has been compressed with chained blocks ( and ) Creates new instance of block decoder. Block size. Must be equal or greater to one used for compression. Independent block encoder. Produces larger files but uses less memory and gives better performance. Creates new instance of Compression level. Block size. LZ4 decoder handling dependent blocks. Creates new instance of . Block size. Number of extra blocks. Static class with factory methods to create LZ4 decoders. Creates appropriate decoder for given parameters. Dependent blocks. Block size. Number of extra blocks. LZ4 decoder. Static class with factory method to create LZ4 encoders. Creates appropriate decoder for given parameters. Dependent blocks. Compression level. Block size. Number of extra blocks. LZ4 encoder. Base class for LZ4 encoders. Provides basic functionality shared by , , and encoders. Do not used directly. Creates new instance of encoder. Needs to be true if using dependent blocks. Block size. Number of extra blocks. Encodes single block using appropriate algorithm. Source buffer. Source buffer length. Target buffer. Target buffer length. Number of bytes actually written to target buffer. Copies current dictionary. Target buffer. Dictionary length. Dictionary length. Functionality of encoders added on top of fixed interface. Tops encoder up with some data. Encoder. Buffer pointer, will be shifted after operation by the number of bytes actually loaded. Length of buffer. true if buffer was topped up, false if no bytes were loaded. Tops encoder up with some data. Encoder. Buffer. Buffer offset. Length of buffer. Number of bytes actually loaded. Tops encoder up with some data. Encoder. Buffer. Buffer offset, will be increased after operation by the number of bytes actually loaded. Length of buffer. true if buffer was topped up, false if no bytes were loaded. Encodes all bytes currently stored in encoder into target buffer. Encoder. Target buffer. Offset in target buffer. Length of target buffer. if true copying bytes is allowed. Number of bytes encoder. If bytes were copied than this value is negative. Encodes all bytes currently stored in encoder into target buffer. Encoder. Target buffer. Offset in target buffer. Will be updated after operation. Length of target buffer. if true copying bytes is allowed. Result of this action. Bytes can be Copied (), Encoded () or nothing could have happened (). Encodes all bytes currently stored in encoder into target buffer. Encoder. Target buffer. Will be updated after operation. Length of buffer. if true copying bytes is allowed. Result of this action. Bytes can be Copied (), Encoded () or nothing could have happened (). Tops encoder and encodes content. Encoder. Source buffer (used to top up from). Source buffer length. Target buffer (used to encode into) Target buffer length. Forces encoding even if encoder is not full. Allows to copy bytes if compression was not possible. Number of bytes loaded (topped up) Number if bytes encoded or copied. Value is 0 if no encoding was done. Action performed. Tops encoder and encodes content. Encoder. Source buffer (used to top up from). Offset within source buffer. Source buffer length. Target buffer (used to encode into) Offset within target buffer. Target buffer length. Forces encoding even if encoder is not full. Allows to copy bytes if compression was not possible. Number of bytes loaded (topped up) Number if bytes encoded or copied. Value is 0 if no encoding was done. Action performed. Tops encoder and encodes content. Encoder. Source buffer (used to top up from). Target buffer (used to encode into) Forces encoding even if encoder is not full. Allows to copy bytes if compression was not possible. Number of bytes loaded (topped up) Number if bytes encoded or copied. Value is 0 if no encoding was done. Action performed. Encoded remaining bytes in encoder. Encoder. Target buffer. Target buffer length. Allows to copy bytes if compression was not possible. Number if bytes encoded or copied. Value is 0 if no encoding was done. Action performed. Encoded remaining bytes in encoder. Encoder. Target buffer. Offset within target buffer. Target buffer length. Allows to copy bytes if compression was not possible. Number if bytes encoded or copied. Value is 0 if no encoding was done. Action performed. Encoded remaining bytes in encoder. Encoder. Target buffer. Allows to copy bytes if compression was not possible. Number if bytes encoded or copied. Value is 0 if no encoding was done. Action performed. Drains decoder by reading all bytes which are ready. Decoder. Target buffer. Offset within target buffer. Offset in decoder relatively to decoder's head. Please note, it should be negative value. Number of bytes. Drains decoder by reading all bytes which are ready. Decoder. Target buffer. Offset in decoder relatively to decoder's head. Please note, it should be negative value. Number of bytes. Decodes data and immediately drains it into target buffer. Decoder. Source buffer (with compressed data, to be decoded). Source buffer length. Target buffer (to drained into). Target buffer length. Number of bytes actually decoded. true decoder was drained, false otherwise. Decodes data and immediately drains it into target buffer. Decoder. Source buffer (with compressed data, to be decoded). Offset within source buffer. Source buffer length. Target buffer (to drained into). Offset within target buffer. Target buffer length. Number of bytes actually decoded. true decoder was drained, false otherwise. Decodes data and immediately drains it into target buffer. Decoder. Source buffer (with compressed data, to be decoded). Target buffer (to drained into). Number of bytes actually decoded. true decoder was drained, false otherwise. Inject already decompressed block and caches it in decoder. Used with uncompressed-yet-chained blocks and pre-made dictionaries. See . Decoder. Uncompressed block. Offset in uncompressed block. Length of uncompressed block. Number of decoded bytes. Decodes previously compressed block and caches decompressed block in decoder. Returns number of bytes decoded. See . Decoder. Compressed block. Offset in compressed block. Length of compressed block. Size of the block. Value 0 indicates default block size. Number of decoded bytes. LZ4 encoder using dependent blocks with fast compression. Creates new instance of Block size. Number of extra blocks. LZ4 encoder using dependent blocks with high compression. Creates new instance of Compression level. Block size. Number of extra blocks. Algorithm selection. Intel and ARMv7 version of 32 bit algorithm. Intel version of 64 bit algorithm. Checks what algorithm should be used (32 vs 64 bit). Existence of this class is an admission of failure. I failed to export internals to test assemblies. Using InternalsVisibleTo work, of course, but with signing (which was requested in https://github.com/MiloszKrajewski/K4os.Compression.LZ4/issues/9) it is absolute PITA. So no, I'm not using InternalsVisibleTo I will just expose this little class with some "redirects" to real internals. Pubternal wrapper for LZ4_stream_t. Creates new instance of wrapper for LZ4_stream_t. Compresses chunk of data using LZ4_compress_fast_continue. Wrapper for LZ4_stream_t Source block address. Target block address. Source block length. Target block length. Acceleration. Number of bytes actually written to target. Naive wrapper around ArrayPool. Makes calls if something should be pooled. Minimum size of the buffer that can be pooled. Allocate temporary buffer to store decompressed data. Minimum size of the buffer. Clear all data. Allocated buffer. Determines if buffer was pooled or not. The logic is quite simple: if buffer is smaller than 512 bytes are pooled. Buffer. true if buffer was pooled; false otherwise Releases allocated buffer. Previously allocated buffer. Utility class with memory related functions. 1 KiB 2 KiB 4 KiB 8 KiB 16 KiB 32 KiB 64 KiB 128 KiB 256 KiB 512 KiB 1 MiB 4 MiB Empty byte array. Checks if process is ran in 32-bit mode. Rounds integer value up to nearest multiple of step. A value. A step. Value rounded up. Copies memory block for to . The target block address. The source block address. Length in bytes. Fills memory block with predefined . The target block address. Value to be used. Length in bytes. Copies memory block for to . The target block address. The source block address. Length in bytes. Copies memory block for to . It handle "move" semantic properly handling overlapping blocks properly. The target block address. The source block address. Length in bytes. Allocated block of memory. It is NOT initialized with zeroes. Size in bytes. Pointer to allocated block. Fill block of memory with zeroes. Address. Length. Original pointer. Fills memory block with repeating pattern of a single byte. Address. A pattern. Length. Original pointer. Allocates block of memory and fills it with zeroes. Size in bytes. Pointer to allocated block. Free memory allocated previously with . Pointer to allocated block. Clones managed array to unmanaged one. Allows quicker yet less safe unchecked access. Input array. Cloned array. Reads exactly 1 byte from given address. Address. Byte at given address. Writes exactly 1 byte to given address. Address. Value. Reads exactly 2 bytes from given address. Address. 2 bytes at given address. Writes exactly 2 bytes to given address. Address. Value. Reads exactly 4 bytes from given address. Address. 4 bytes at given address. Writes exactly 4 bytes to given address. Address. Value. Reads exactly 8 bytes from given address. Address. 8 bytes at given address. Writes exactly 8 bytes to given address. Address. Value. Copies exactly 1 byte from source to target. Target address. Source address. Copies exactly 2 bytes from source to target. Target address. Source address. Copies exactly 4 bytes from source to target. Target address. Source address. Copies exactly 8 bytes from source to target. Target address. Source address. Represents pinned memory. It either points to unmanaged memory or block of memory from shared array pool. When disposed, it handles it appropriately. Maximum size of the buffer that can be pooled from shared array pool. Pointer to block of bytes. Pointer to block of bytes as span. Pointer to block of bytes. Allocates pinned block of memory, depending on the size it tries to use shared array pool. Size in bytes. Indicates if block should be zeroed. Allocated . Allocates pinned block of memory, depending on the size it tries to use shared array pool. Pinned memory pointer. Size in bytes. Indicates if block should be zeroed. Allocated . Allocates pinned block of memory for one item from shared array pool. PinnedMemory pointer. Indicates if block should be zeroed. Type of item. Fill allocated block of memory with zeros. Releases the memory. Skeleton for class with unmanaged resources. Implements but also handles proper release in case was not called. Determines if object was already disposed. Throws exception is object has been disposed already. Convenience method. Thrown if object is already disposed. Method releasing unmanaged resources. Method releasing managed resources. Disposed resources. true if dispose was explicitly called, false if called from GC. Destructor. Unsafe memory operations. Reads 4 bytes from given address. Address. 4 bytes at given address. Writes 4 or 8 bytes to given address. Address. Value. Copies exactly 16 bytes from source to target. Target address. Source address. Copies exactly 18 bytes from source to target. Target address. Source address. Copies memory block for to up to (around) . It does not handle overlapping blocks and may copy up to 8 bytes more than expected. The target block address. The source block address. The limit (in target block). Copies memory block for to up to (around) . It does not handle overlapping blocks and may copy up to 32 bytes more than expected. This version copies two times 16 bytes (instead of one time 32 bytes) because it must be compatible with offsets >= 16. The target block address. The source block address. The limit (in target block). Unsafe memory operations. Reads exactly 2 bytes from given address. Address. 2 bytes at given address. Writes exactly 2 bytes to given address. Address. Value. Reads exactly 4 bytes from given address. Address. 4 bytes at given address. Writes exactly 4 bytes to given address. Address. Value. Copies exactly 1 byte from source to target. Target address. Source address. Copies exactly 2 bytes from source to target. Target address. Source address. Copies exactly 4 bytes from source to target. Target address. Source address. Reads exactly 8 bytes from given address. Address. 8 bytes at given address. Writes exactly 8 bytes to given address. Address. Value. Copies exactly 8 bytes from source to target. Target address. Source address. Reads 8 bytes from given address. Address. 8 bytes at given address. Writes 8 bytes to given address. Address. Value. Copies exactly 16 bytes from source to target. Target address. Source address. Copies exactly 18 bytes from source to target. Target address. Source address. Copies memory block for to up to (around) . It does not handle overlapping blocks and may copy up to 8 bytes more than expected. The target block address. The source block address. The limit (in target block). Copies memory block for to up to (around) . It does not handle overlapping blocks and may copy up to 32 bytes more than expected. This version copies two times 16 bytes (instead of one time 32 bytes) because it must be compatible with offsets >= 16. The target block address. The source block address. The limit (in target block). Static class exposing LZ4 block compression methods. Version of LZ4 implementation. Enforces 32-bit compression/decompression algorithm even on 64-bit systems. Please note, this property should not be used on regular basis, it just allows to workaround some problems on platforms which do not support 64-bit the same was as Intel (for example: unaligned read/writes). Maximum size after compression. Length of input buffer. Maximum length after compression. Compresses data from one buffer into another. Input buffer. Length of input buffer. Output buffer. Output buffer length. Compression level. Number of bytes written, or negative value if output buffer is too small. Compresses data from one buffer into another. Input buffer. Output buffer. Compression level. Number of bytes written, or negative value if output buffer is too small. Compresses data from one buffer into another. Input buffer. Input buffer offset. Input buffer length. Output buffer. Output buffer offset. Output buffer length. Compression level. Number of bytes written, or negative value if output buffer is too small. Decompresses data from given buffer. Input buffer. Input buffer length. Output buffer. Output buffer length. Number of bytes written, or negative value if output buffer is too small. Decompresses data from given buffer, stopping at . Input buffer. Input buffer length. Output buffer. Output buffer length. Decoding stops at this amount. Number of bytes written, or negative value if output buffer is too small. Decompresses data from given buffer. Input buffer. Input buffer length. Output buffer. Output buffer length. Dictionary buffer. Dictionary buffer length. Number of bytes written, or negative value if output buffer is too small. Decompresses data from given buffer, stopping at buffer length. Input buffer. Output buffer. Decoding stops at end of buffer. Number of bytes written, or negative value if output buffer is too small. Decompresses data from given buffer. Input buffer. Output buffer. Number of bytes written, or negative value if output buffer is too small. Decompresses data from given buffer. Input buffer. Output buffer. Dictionary buffer. Number of bytes written, or negative value if output buffer is too small. Decompresses data from given buffer. Input buffer. Input buffer offset. Input buffer length. Output buffer. Output buffer offset. Output buffer length. Number of bytes written, or negative value if output buffer is too small. Decompresses data from given buffer. Input buffer. Input buffer offset. Input buffer length. Output buffer. Output buffer offset. Output buffer length. Dictionary buffer. Dictionary buffer offset. Dictionary buffer length. Number of bytes written, or negative value if output buffer is too small. Compression level. Fast compression. High compression, level 3. High compression, level 4. High compression, level 5. High compression, level 6. High compression, level 7. High compression, level 8. High compression, level 9. Optimal compression, level 10. Optimal compression, level 11. Maximum compression, level 12. Pickling support with LZ4 compression. Pickling support with LZ4 compression. Compresses input buffer into self-contained package. Input buffer. Compression level. Output buffer. Compresses input buffer into self-contained package. Input buffer. Input buffer offset. Input buffer length. Compression level. Output buffer. Compresses input buffer into self-contained package. Input buffer. Length of input data. Compression level. Output buffer. Compresses input buffer into self-contained package. Input buffer. Compression level. Output buffer. Compresses input buffer into self-contained package. Input buffer. Where the compressed data is written. Compression level. Output buffer. Compresses input buffer into self-contained package. Input buffer. Where the compressed data is written. Compression level. Output buffer. Decompresses previously pickled buffer (see: . Input buffer. Output buffer. Decompresses previously pickled buffer (see: . Input buffer. Input buffer offset. Input buffer length. Output buffer. Decompresses previously pickled buffer (see: . Input buffer. Input buffer length. Output buffer. Decompresses previously pickled buffer (see: . Input buffer. Output buffer. Decompresses previously pickled buffer (see: . Input buffer. Where the decompressed data is written. Decompresses previously pickled buffer (see: . Input buffer. Where the decompressed data is written. Returns the uncompressed size of a chunk of compressed data. The data to inspect. The size in bytes of the data once unpickled. Returns the uncompressed size of a chunk of compressed data. Decoded header. The size in bytes of the data once unpickled. Decompresses previously pickled buffer (see: . Input buffer. Where the decompressed data is written. You obtain the size of the output buffer by calling . Specifies that null is allowed as an input even if the corresponding type disallows it. Specifies that null is disallowed as an input even if the corresponding type allows it. Applied to a method that will never return under any circumstance. Specifies that the method will not return if the associated Boolean parameter is passed the specified value. Initializes the attribute with the specified parameter value. The condition parameter value. Code after the method will be considered unreachable by diagnostics if the argument to the associated parameter matches this value. Gets the condition parameter value. Specifies that an output may be null even if the corresponding type disallows it. Specifies that when a method returns , the parameter may be null even if the corresponding type disallows it. Initializes the attribute with the specified return value condition. The return value condition. If the method returns this value, the associated parameter may be null. Gets the return value condition. Specifies that the method or property will ensure that the listed field and property members have not-null values. Initializes the attribute with a field or property member. The field or property member that is promised to be not-null. Initializes the attribute with the list of field and property members. The list of field and property members that are promised to be not-null. Gets field or property member names. Specifies that the method or property will ensure that the listed field and property members have not-null values when returning with the specified return value condition. Initializes the attribute with the specified return value condition and a field or property member. The return value condition. If the method returns this value, the associated parameter will not be null. The field or property member that is promised to be not-null. Initializes the attribute with the specified return value condition and list of field and property members. The return value condition. If the method returns this value, the associated parameter will not be null. The list of field and property members that are promised to be not-null. Gets the return value condition. Gets field or property member names. Specifies that an output will not be null even if the corresponding type allows it. Specifies that an input argument was not null when the call returns. Specifies that the output will be non-null if the named parameter is non-null. Initializes the attribute with the associated parameter name. The associated parameter name. The output will be non-null if the argument to the parameter specified is non-null. Gets the associated parameter name. Specifies that when a method returns , the parameter will not be null even if the corresponding type allows it. Initializes the attribute with the specified return value condition. The return value condition. If the method returns this value, the associated parameter will not be null. Gets the return value condition. Specifies that this constructor sets all required members for the current type, and callers do not need to set any required members themselves. Specifies the syntax used in a string. Initializes the with the identifier of the syntax used. The syntax identifier. Initializes the with the identifier of the syntax used. The syntax identifier. Optional arguments associated with the specific syntax employed. Gets the identifier of the syntax used. Optional arguments associated with the specific syntax employed. The syntax identifier for strings containing composite formats for string formatting. The syntax identifier for strings containing date format specifiers. The syntax identifier for strings containing date and time format specifiers. The syntax identifier for strings containing format specifiers. The syntax identifier for strings containing format specifiers. The syntax identifier for strings containing JavaScript Object Notation (JSON). The syntax identifier for strings containing numeric format specifiers. The syntax identifier for strings containing regular expressions. The syntax identifier for strings containing time format specifiers. The syntax identifier for strings containing format specifiers. The syntax identifier for strings containing URIs. The syntax identifier for strings containing XML. Used to indicate a byref escapes and is not scoped. There are several cases where the C# compiler treats a as implicitly - where the compiler does not allow the to escape the method. For example: for instance methods. parameters that refer to types. parameters. This attribute is used in those instances where the should be allowed to escape. Applying this attribute, in any form, has impact on consumers of the applicable API. It is necessary for API authors to understand the lifetime implications of applying this attribute and how it may impact their users. Represent a type can be used to index a collection either from the start or the end. Index is used by the C# compiler to support the new index syntax int[] someArray = new int[5] { 1, 2, 3, 4, 5 } ; int lastElement = someArray[^1]; // lastElement = 5 Construct an Index using a value and indicating if the index is from the start or from the end. The index value. it has to be zero or positive number. Indicating if the index is from the start or from the end. If the Index constructed from the end, index value 1 means pointing at the last element and index value 0 means pointing at beyond last element. Create an Index pointing at first element. Create an Index pointing at beyond last element. Create an Index from the start at the position indicated by the value. The index value from the start. Create an Index from the end at the position indicated by the value. The index value from the end. Returns the index value. Indicates whether the index is from the start or the end. Calculate the offset from the start using the giving collection length. The length of the collection that the Index will be used with. length has to be a positive value For performance reason, we don't validate the input length parameter and the returned offset value against negative values. we don't validate either the returned offset is greater than the input length. It is expected Index will be used with collections which always have non negative length/count. If the returned offset is negative and then used to index a collection will get out of range exception which will be same affect as the validation. Indicates whether the current Index object is equal to another object of the same type. An object to compare with this object Indicates whether the current Index object is equal to another Index object. An object to compare with this object Returns the hash code for this instance. Converts integer number to an Index. Converts the value of the current Index object to its equivalent string representation. Indicates the type of the async method builder that should be used by a language compiler to build the attributed async method or to build the attributed type when used as the return type of an async method. Initializes the . The of the associated builder. Gets the of the associated builder. An attribute that allows parameters to receive the expression of other parameters. Initializes a new instance of the class. The condition parameter value. Gets the parameter name the expression is retrieved from. Indicates that compiler support for a particular feature is required for the location where this attribute is applied. Creates a new instance of the type. The name of the feature to indicate. The name of the compiler feature. If true, the compiler can choose to allow access to the location where this attribute is applied if it does not understand . The used for the ref structs C# feature. The used for the required members C# feature. Indicates which arguments to a method involving an interpolated string handler should be passed to that handler. Initializes a new instance of the class. The name of the argument that should be passed to the handler. may be used as the name of the receiver in an instance method. Initializes a new instance of the class. The names of the arguments that should be passed to the handler. may be used as the name of the receiver in an instance method. Gets the names of the arguments that should be passed to the handler. may be used as the name of the receiver in an instance method. Indicates the attributed type is to be used as an interpolated string handler. Reserved to be used by the compiler for tracking metadata. This class should not be used by developers in source code. Used to indicate to the compiler that a method should be called in its containing module's initializer. When one or more valid methods with this attribute are found in a compilation, the compiler will emit a module initializer which calls each of the attributed methods. Certain requirements are imposed on any method targeted with this attribute: - The method must be `static`. - The method must be an ordinary member method, as opposed to a property accessor, constructor, local function, etc. - The method must be parameterless. - The method must return `void`. - The method must not be generic or be contained in a generic type. - The method's effective accessibility must be `internal` or `public`. The specification for module initializers in the .NET runtime can be found here: https://github.com/dotnet/runtime/blob/main/docs/design/specs/Ecma-335-Augments.md#module-initializer Specifies that a type has required members or that a member is required. Used to indicate to the compiler that the .locals init flag should not be set in method headers. Initializes a new instance of the class. Initializes a new instance of the class with the specified message. An optional message associated with this attribute instance. Returns the optional message associated with this attribute instance. Returns the optional URL associated with this attribute instance.