1219354Spjd/*-
2219354Spjd * Copyright (c) 2011 Pawel Jakub Dawidek <pawel@dawidek.net>
3219354Spjd * All rights reserved.
4219354Spjd *
5219354Spjd * Redistribution and use in source and binary forms, with or without
6219354Spjd * modification, are permitted provided that the following conditions
7219354Spjd * are met:
8219354Spjd * 1. Redistributions of source code must retain the above copyright
9219354Spjd *    notice, this list of conditions and the following disclaimer.
10219354Spjd * 2. Redistributions in binary form must reproduce the above copyright
11219354Spjd *    notice, this list of conditions and the following disclaimer in the
12219354Spjd *    documentation and/or other materials provided with the distribution.
13219354Spjd *
14219354Spjd * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
15219354Spjd * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16219354Spjd * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17219354Spjd * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
18219354Spjd * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19219354Spjd * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20219354Spjd * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21219354Spjd * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22219354Spjd * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23219354Spjd * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24219354Spjd * SUCH DAMAGE.
25219354Spjd *
26219354Spjd * $FreeBSD$
27219354Spjd */
28219354Spjd
29219354Spjd#ifndef	_HAST_COMPRESSION_H_
30219354Spjd#define	_HAST_COMPRESSION_H_
31219354Spjd
32219354Spjd#include <stdlib.h>	/* size_t */
33219354Spjd
34219354Spjd#include <hast.h>
35219354Spjd#include <nv.h>
36219354Spjd
37219354Spjdconst char *compression_name(int num);
38219354Spjd
39219354Spjdint compression_send(const struct hast_resource *res, struct nv *nv,
40219354Spjd    void **datap, size_t *sizep, bool *freedatap);
41219354Spjdint compression_recv(const struct hast_resource *res, struct nv *nv,
42219354Spjd    void **datap, size_t *sizep, bool *freedatap);
43219354Spjd
44219354Spjd#endif	/* !_HAST_COMPRESSION_H_ */
45