The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/contrib/openzfs/include/os/linux/spl/sys/zmod.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /*
    2  *  Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC.
    3  *  Copyright (C) 2007 The Regents of the University of California.
    4  *  Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
    5  *  Written by Brian Behlendorf <behlendorf1@llnl.gov>.
    6  *  UCRL-CODE-235197
    7  *
    8  *  This file is part of the SPL, Solaris Porting Layer.
    9  *
   10  *  The SPL is free software; you can redistribute it and/or modify it
   11  *  under the terms of the GNU General Public License as published by the
   12  *  Free Software Foundation; either version 2 of the License, or (at your
   13  *  option) any later version.
   14  *
   15  *  The SPL is distributed in the hope that it will be useful, but WITHOUT
   16  *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   17  *  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   18  *  for more details.
   19  *
   20  *  You should have received a copy of the GNU General Public License along
   21  *  with the SPL.  If not, see <http://www.gnu.org/licenses/>.
   22  *
   23  *
   24  *  z_compress_level/z_uncompress are nearly identical copies of the
   25  *  compress2/uncompress functions provided by the official zlib package
   26  *  available at http://zlib.net/.  The only changes made we to slightly
   27  *  adapt the functions called to match the linux kernel implementation
   28  *  of zlib.  The full zlib license follows:
   29  *
   30  *  zlib.h -- interface of the 'zlib' general purpose compression library
   31  *  version 1.2.5, April 19th, 2010
   32  *
   33  *  Copyright (C) 1995-2010 Jean-loup Gailly and Mark Adler
   34  *
   35  *  This software is provided 'as-is', without any express or implied
   36  *  warranty.  In no event will the authors be held liable for any damages
   37  *  arising from the use of this software.
   38  *
   39  *  Permission is granted to anyone to use this software for any purpose,
   40  *  including commercial applications, and to alter it and redistribute it
   41  *  freely, subject to the following restrictions:
   42  *
   43  *  1. The origin of this software must not be misrepresented; you must not
   44  *     claim that you wrote the original software. If you use this software
   45  *     in a product, an acknowledgment in the product documentation would be
   46  *     appreciated but is not required.
   47  *  2. Altered source versions must be plainly marked as such, and must not be
   48  *     misrepresented as being the original software.
   49  *  3. This notice may not be removed or altered from any source distribution.
   50  *
   51  *  Jean-loup Gailly
   52  *  Mark Adler
   53  */
   54 
   55 #ifndef _SPL_ZMOD_H
   56 #define _SPL_ZMOD_H
   57 
   58 #include <sys/types.h>
   59 #include <linux/zlib.h>
   60 
   61 extern int z_compress_level(void *dest, size_t *destLen, const void *source,
   62     size_t sourceLen, int level);
   63 extern int z_uncompress(void *dest, size_t *destLen, const void *source,
   64     size_t sourceLen);
   65 
   66 int spl_zlib_init(void);
   67 void spl_zlib_fini(void);
   68 
   69 #endif /* SPL_ZMOD_H */

Cache object: c0f156916f48e5156e0122d794c0da01


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.