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) Facebook, Inc.
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
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 {
108 size_t size;
110
115
120
121#endif
Definition data.h:60
size_t size
Definition data.h:62
uint8_t * data
Definition data.h:61
size_t capacity
Definition data.h:63
Definition data.h:106
size_t size
Definition data.h:108
data_buffer_t const * buffers
Definition data.h:107
Definition data.h:22
uint64_t xxhash64
Definition data.h:24
char const * url
Definition data.h:23
char const * path
Definition data.h:25
Definition data.h:28
data_resource_t dict
Definition data.h:30
data_resource_t data
Definition data.h:29
data_type_t type
Definition data.h:31
char const * name
Definition data.h:32
Definition poolTests.c:28
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
data_type_t
Definition data.h:17