Parolin 0.7.9 6796
Console (soon DLLs) to do a tar like job
Loading...
Searching...
No Matches
method.c File Reference
#include "method.h"
#include <stdio.h>
#include <stdlib.h>
#include <zstd.h>

Data Structures

struct  buffer_state_t
 

Macros

#define ZSTD_STATIC_LINKING_ONLY
 
#define MIN(x, y)
 
#define container_of(ptr, type, member)
 

Functions

void method_set_zstdcli (char const *zstdcli)
 

Variables

method_t const simple
 
method_t const compress_cctx
 
method_t const advanced_one_pass
 
method_t const advanced_one_pass_small_out
 
method_t const advanced_streaming
 
method_t const old_streaming
 
method_t const old_streaming_advanced
 
method_t const old_streaming_cdict
 
method_t const old_streaming_advanced_cdict
 
method_t const cli
 
method_t const *constmethods = g_methods
 

Macro Definition Documentation

◆ container_of

#define container_of ( ptr,
type,
member )
Value:
((type*)(ptr == NULL ? NULL : (char*)(ptr)-offsetof(type, member)))
#define NULL
Definition getopt1.c:37

Macro to get a pointer of type, given ptr, which is a member variable with the given name, member.

method_state_t* base = ...;
buffer_state_t* state = container_of(base, buffer_state_t, base);

◆ MIN

#define MIN ( x,
y )
Value:
((x) < (y) ? (x) : (y))

◆ ZSTD_STATIC_LINKING_ONLY

#define ZSTD_STATIC_LINKING_ONLY

Function Documentation

◆ method_set_zstdcli()

void method_set_zstdcli ( char const * zstdcli)

Set the zstd cli path. Must be called before any methods are used.

Variable Documentation

◆ advanced_one_pass

method_t const advanced_one_pass
Initial value:
= {
.name = "advanced one pass",
.create = buffer_state_create,
.compress = advanced_one_pass_compress,
.destroy = buffer_state_destroy,
}

◆ advanced_one_pass_small_out

method_t const advanced_one_pass_small_out
Initial value:
= {
.name = "advanced one pass small out",
.create = buffer_state_create,
.compress = advanced_one_pass_compress,
.destroy = buffer_state_destroy,
}

◆ advanced_streaming

method_t const advanced_streaming
Initial value:
= {
.name = "advanced streaming",
.create = buffer_state_create,
.compress = advanced_streaming_compress,
.destroy = buffer_state_destroy,
}

◆ cli

Initial value:
= {
.name = "zstdcli",
.create = method_state_create,
.compress = cli_compress,
.destroy = method_state_destroy,
}

◆ compress_cctx

method_t const compress_cctx
Initial value:
= {
.name = "compress cctx",
.create = buffer_state_create,
.compress = compress_cctx_compress,
.destroy = buffer_state_destroy,
}

◆ methods

method_t const* const* methods = g_methods

A NULL-terminated list of methods.

◆ old_streaming

method_t const old_streaming
Initial value:
= {
.name = "old streaming",
.create = buffer_state_create,
.compress = old_streaming_compress,
.destroy = buffer_state_destroy,
}

◆ old_streaming_advanced

method_t const old_streaming_advanced
Initial value:
= {
.name = "old streaming advanced",
.create = buffer_state_create,
.compress = old_streaming_compress_advanced,
.destroy = buffer_state_destroy,
}

◆ old_streaming_advanced_cdict

method_t const old_streaming_advanced_cdict
Initial value:
= {
.name = "old streaming advanced cdict",
.create = buffer_state_create,
.compress = old_streaming_compress_cdict_advanced,
.destroy = buffer_state_destroy,
}

◆ old_streaming_cdict

method_t const old_streaming_cdict
Initial value:
= {
.name = "old streaming cdict",
.create = buffer_state_create,
.compress = old_streaming_compress_cdict,
.destroy = buffer_state_destroy,
}

◆ simple

method_t const simple
Initial value:
= {
.name = "compress simple",
.create = buffer_state_create,
.compress = simple_compress,
.destroy = buffer_state_destroy,
}