Parolin 0.7.9 6796
Console (soon DLLs) to do a tar like job
Loading...
Searching...
No Matches
data.h
Go to the documentation of this file.
1/*
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 * All rights reserved.
4 *
5 * This source code is licensed under both the BSD-style license (found in the
6 * LICENSE file in the root directory of this source tree) and the GPLv2 (found
7 * in the COPYING file in the root directory of this source tree).
8 * You may select, at your option, one of the above-listed licenses.
9 */
10
11#ifndef DATA_H
12#define DATA_H
13
14#include <stddef.h>
15#include <stdint.h>
16
17typedef enum {
21
22typedef struct {
23 char const* url;
24 uint64_t xxhash64;
25 char const* path;
27
28typedef struct {
32 char const* name;
33} data_t;
34
38extern data_t const* const* data;
39
40
41int data_has_dict(data_t const* data);
42
53int data_init(char const* dir);
54
58void data_finish(void);
59
60typedef struct {
61 uint8_t* data;
62 size_t size;
63 size_t capacity;
65
73
80
86data_buffer_t data_buffer_read(char const* filename);
87
93data_buffer_t data_buffer_create(size_t capacity);
94
99
104
105
106typedef struct {
107 data_buffer_t const* buffers;
108 size_t size;
110
115
120
121#endif
url
Definition setup.py:284
type
Definition test-lz4-speed.py:247
Definition data.h:60
Definition data.h:106
Definition data.h:22
Definition data.h:28
Definition poolTests.c:28
size_t size
Definition platform.h:559
char name[NAME_LEN_MAX+1]
Name of the filter.
Definition string_conversion.c:450
const void * dict
Definition zbuff.h:76
int data_has_dict(data_t const *data)
Definition data.c:101
data_buffers_t data_buffers_get(data_t const *data)
Definition data.c:204
data_buffer_t data_buffer_create(size_t capacity)
Definition data.c:109
data_type_t
Definition data.h:17
@ data_type_file
Definition data.h:18
@ data_type_dir
Definition data.h:19
data_t const *const * data
Definition XzCrc64.c:50
void data_finish(void)
Definition data.c:627
data_buffer_t data_buffer_get_dict(data_t const *data)
Definition data.c:163
void data_buffers_free(data_buffers_t buffers)
Definition data.c:239
int data_buffer_compare(data_buffer_t buffer1, data_buffer_t buffer2)
Definition data.c:172
void data_buffer_free(data_buffer_t buffer)
Definition data.c:186
data_buffer_t data_buffer_get_data(data_t const *data)
Definition data.c:154
int data_init(char const *dir)
Definition data.c:589
data_buffer_t data_buffer_read(char const *filename)
Definition data.c:119