-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommon.h
33 lines (25 loc) · 788 Bytes
/
common.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#pragma once
#include "export.h"
#ifdef _MSC_VER
#define PATH_MAX 260
#else
#include <linux/limits.h> // PATH_MAX
#include <stddef.h> // size_t
#endif
#ifdef _MSC_VER
#define _CRT_SECURE_NO_WARNINGS
#endif
#define PACKER_VERSION 0
#define VARIABLE_WIDTH 1
#define BUFFLEN 16384 /* the larger, the better for compression. This value must be the same for coder and decoder. */
#define DEFAULT_MAX_BITS 15
#define SUPPORTED_MAX_BITS 16
long fileSize (const char *filename);
bool is_big_endian(void);
void cleanup (const char *outfile, int flags);
bool file_exists (const char *filename);
char *str_dup (const char *s);
#ifndef _MSC_VER
int tmpnam_s(char* temp_name, size_t sizeInChars);
int strcpy_s(char *dest, size_t dest_len, const char *src);
#endif