dm_zstd_compress Interface

public interface dm_zstd_compress

Generic Zstandard compression function.

Called by

interface~~dm_zstd_compress~~CalledByGraph interface~dm_zstd_compress dm_zstd_compress proc~dm_z_compress_type dm_z_compress_type proc~dm_z_compress_type->interface~dm_zstd_compress proc~dm_rpc_post_type dm_rpc_post_type proc~dm_rpc_post_type->proc~dm_z_compress_type proc~dm_rpc_post_types dm_rpc_post_types proc~dm_rpc_post_types->proc~dm_z_compress_type proc~dm_z_compress_types dm_z_compress_types proc~dm_z_compress_types->proc~dm_z_compress_type interface~dm_rpc_post dm_rpc_post interface~dm_rpc_post->proc~dm_rpc_post_type interface~dm_rpc_post->proc~dm_rpc_post_types

Module Procedures

private function zstd_compress_multi(context, input, output, level, input_len, output_len) result(rc)

Compresses input string using the zstd simple context function. If no compression level is passed, the Zstandard default is used. The Zstandard context context has to be destroy with dm_zstd_destroy() once finished.

The string output may be larger than the actual length. The argument output_len contains the actual length.

The function returns the following error codes:

  • E_ALLOC if the allocation of the output string failed.
  • E_EMPTY if the compressed size is 0.
  • E_ZSTD if the compression failed.

Arguments

Type IntentOptional Attributes Name
type(zstd_context_type), intent(inout) :: context

Zstandard context type.

character(len=*), intent(inout) :: input

Input bytes.

character(len=:), intent(out), allocatable :: output

Output bytes.

integer, intent(in), optional :: level

Compression level.

integer(kind=i8), intent(in), optional :: input_len

Actual input length.

integer(kind=i8), intent(out), optional :: output_len

Actual output length.

Return Value integer

private function zstd_compress_single(input, output, level, input_len, output_len) result(rc)

Compresses input string using the zstd simple function. If no compression level is passed, the Zstandard default is used.

The string output may be larger than the actual length. The argument output_len contains the actual length.

The function returns the following error codes:

  • E_ALLOC if the allocation of the output string failed.
  • E_EMPTY if the compressed size is 0.
  • E_ZSTD if the compression failed.

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(inout) :: input

Input bytes.

character(len=:), intent(out), allocatable :: output

Output bytes.

integer, intent(in), optional :: level

Compression level.

integer(kind=i8), intent(in), optional :: input_len

Actual input length.

integer(kind=i8), intent(out), optional :: output_len

Actual output length.

Return Value integer