2 * This file is part of the bayou project.
4 * Copyright (C) 2008 Advanced Micro Devices, Inc.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
24 typedef void (*LAR_CompFunc
) (char *, int, char *, int *);
25 typedef void (*LAR_DecompFunc
) (char *, int, char *, int);
29 LAR_CompFunc cfuncs
[ALGO_INVALID
];
30 LAR_DecompFunc dfuncs
[ALGO_INVALID
];
40 /* These are the offsets within the file. */
46 char name
[MAX_PATHLEN
];
57 int LAR_AppendBuffer(struct LAR
*lar
, unsigned char *buffer
, int len
,
58 struct LARAttr
*attr
);
59 int LAR_AppendSelf(struct LAR
*lar
, const char *filename
, struct LARAttr
*attr
);
60 int LAR_AppendFile(struct LAR
*lar
, const char *filename
, struct LARAttr
*attr
);
61 int LAR_DeleteFile(struct LAR
*lar
, const char *filename
);
62 void LAR_CloseFile(struct LARFile
*file
);
63 struct LARFile
*LAR_MapFile(struct LAR
*lar
, const char *filename
);
64 int LAR_SetCompressionFuncs(struct LAR
*lar
, int algo
,
65 LAR_CompFunc cfunc
, LAR_DecompFunc dfunc
);
66 void LAR_Close(struct LAR
*lar
);
67 struct LAR
*LAR_Open(const char *filename
);
68 struct LAR
*LAR_Create(const char *filename
);
69 void LAR_SetAttrs(struct LARAttr
*attrs
, char *name
, int algo
);