Put the interesting parts of XZ Utils into the public domain.

Some minor documentation cleanups were made at the same time.
This commit is contained in:
Lasse Collin 2009-04-13 11:27:40 +03:00
parent e79c42d854
commit 02ddf09bc3
206 changed files with 865 additions and 2020 deletions

65
COPYING
View File

@ -1,25 +1,60 @@
LZMA Utils Licenses XZ Utils Licensing
------------------- ==================
Different licenses apply to different files in this package. Here Different licenses apply to different files in this package. Here
is a rough summary of which license apply to which parts of this is a rough summary of which licenses apply to which parts of this
package (but check the individual files to be sure!): package (but check the individual files to be sure!):
- Everything under src/liblzma/check and tests/files is public
domain.
- Everything else under the src directory is under the GNU LGPL
2.1 or (at your opinion) any later version.
- Outside the src directory, there are some files that are under
the GNU GPL 2 or (at your opinion) any later version, or under
the GNU GPL 3 or (at your opinion) any later version.
- Most documentation files are under an all-permissive license.
The following license texts are included in the following files - liblzma is in the public domain.
in this package:
- xz, xzdec, and lzmadec command line tools are in the public
domain unless GNU getopt_long had to be compiled and linked
in from the lib directory. The getopt_long code is under
GNU LGPLv2.1+.
- The scripts to grep, diff, and view compressed files have been
adapted from gzip. These scripts and their documentation are
under GNU GPLv2+.
- All the documentation in the doc directory and most of the
XZ Utils specific documentation files in other directories
are in the public domain.
- Translated messages are in the public domain.
- The build system contains public domain files, and files that
are under GNU GPLv2+ or GNU GPLv3+. None of these files end up
in the binaries being built.
- Test files and test code in the tests directory, and debugging
utilities in the debug directory are in the public domain.
- The extra directory may contain public domain files, and files
that are under various free software licenses.
You can do whatever you want with the files that have been put into
the public domain. If you find public domain legally problematic,
take the previous sentence as a license grant. If you still find
the lack of copyright legally problematic, you have too many
lawyers.
If you copy significant amounts of public domain code from XZ Utils
into your project, acknowledging this somewhere in your software is
polite, but naturally it is not legally required.
As usual, this software is provided "as is", without any warranty.
The following license texts are included in the following files:
- COPYING.LGPLv2.1: GNU Lesser General Public License version 2.1 - COPYING.LGPLv2.1: GNU Lesser General Public License version 2.1
- COPYING.GPLv2: GNU General Public License version 2 - COPYING.GPLv2: GNU General Public License version 2
- COPYING.GPLv3: GNU General Public License version 3 - COPYING.GPLv3: GNU General Public License version 3
If you have questions, don't hesitate to ask the copyright holder(s) Note that the toolchain (compiler, linker etc.) may add some code
for more information. pieces that are copyrighted. Thus, it is possible that e.g. liblzma
binary wouldn't actually be in the public domain in its entirety
even though it contains no copyrighted code from this package.
If you have questions, don't hesitate to ask the author(s) for more
information.

View File

@ -1,2 +1,2 @@
See the commit log in the git repository: See the commit log in the git repository:
git://ctrl.tukaani.org/lzma-utils.git git://ctrl.tukaani.org/xz.git

View File

@ -955,13 +955,13 @@ ENABLE_PREPROCESSING = YES
# compilation will be performed. Macro expansion can be done in a controlled # compilation will be performed. Macro expansion can be done in a controlled
# way by setting EXPAND_ONLY_PREDEF to YES. # way by setting EXPAND_ONLY_PREDEF to YES.
MACRO_EXPANSION = NO MACRO_EXPANSION = YES
# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
# then the macro expansion is limited to the macros specified with the # then the macro expansion is limited to the macros specified with the
# PREDEFINED and EXPAND_AS_DEFINED tags. # PREDEFINED and EXPAND_AS_DEFINED tags.
EXPAND_ONLY_PREDEF = NO EXPAND_ONLY_PREDEF = YES
# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files # If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
# in the INCLUDE_PATH (see below) will be search if a #include is found. # in the INCLUDE_PATH (see below) will be search if a #include is found.
@ -989,7 +989,9 @@ INCLUDE_FILE_PATTERNS =
# undefined via #undef or recursively expanded use the := operator # undefined via #undef or recursively expanded use the := operator
# instead of the = operator. # instead of the = operator.
PREDEFINED = PREDEFINED = LZMA_API(type)=type \
LZMA_API_IMPORT \
LZMA_API_CALL=
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
# this tag can be used to specify a list of macro names that should be expanded. # this tag can be used to specify a list of macro names that should be expanded.

View File

@ -1,15 +1,8 @@
## ##
## Copyright (C) 2007 Lasse Collin ## Author: Lasse Collin
## ##
## This library is free software; you can redistribute it and/or ## This file has been put into the public domain.
## modify it under the terms of the GNU Lesser General Public ## You can do whatever you want with this file.
## License as published by the Free Software Foundation; either
## version 2.1 of the License, or (at your option) any later version.
##
## This library is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
## Lesser General Public License for more details.
## ##
DIST_SUBDIRS = lib src po tests debug DIST_SUBDIRS = lib src po tests debug

View File

@ -1,5 +1,14 @@
#!/bin/sh #!/bin/sh
###############################################################################
#
# Author: Lasse Collin
#
# This file has been put into the public domain.
# You can do whatever you want with this file.
#
###############################################################################
set -e -x set -e -x
autopoint -f autopoint -f

View File

@ -3,17 +3,10 @@
############################################################################### ###############################################################################
# #
# Copyright (C) 2007 Lasse Collin # Author: Lasse Collin
# #
# This library is free software; you can redistribute it and/or # This file has been put into the public domain.
# modify it under the terms of the GNU Lesser General Public # You can do whatever you want with this file.
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
# #
############################################################################### ###############################################################################

View File

@ -1,15 +1,8 @@
## ##
## Copyright (C) 2008 Lasse Collin ## Author: Lasse Collin
## ##
## This library is free software; you can redistribute it and/or ## This file has been put into the public domain.
## modify it under the terms of the GNU Lesser General Public ## You can do whatever you want with this file.
## License as published by the Free Software Foundation; either
## version 2.1 of the License, or (at your option) any later version.
##
## This library is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
## Lesser General Public License for more details.
## ##
noinst_PROGRAMS = \ noinst_PROGRAMS = \

View File

@ -3,17 +3,10 @@
/// \file crc32.c /// \file crc32.c
/// \brief Primitive CRC32 calculation tool /// \brief Primitive CRC32 calculation tool
// //
// Copyright (C) 2008 Lasse Collin // Author: Lasse Collin
// //
// This library is free software; you can redistribute it and/or // This file has been put into the public domain.
// modify it under the terms of the GNU Lesser General Public // You can do whatever you want with this file.
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -3,17 +3,10 @@
/// \file full_flush.c /// \file full_flush.c
/// \brief Encode files using LZMA_FULL_FLUSH /// \brief Encode files using LZMA_FULL_FLUSH
// //
// Copyright (C) 2008 Lasse Collin // Author: Lasse Collin
// //
// This library is free software; you can redistribute it and/or // This file has been put into the public domain.
// modify it under the terms of the GNU Lesser General Public // You can do whatever you want with this file.
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -3,11 +3,10 @@
/// \file hex2bin.c /// \file hex2bin.c
/// \brief Converts hexadecimal input strings to binary /// \brief Converts hexadecimal input strings to binary
// //
// This code has been put into the public domain. // Author: Lasse Collin
// //
// This library is distributed in the hope that it will be useful, // This file has been put into the public domain.
// but WITHOUT ANY WARRANTY; without even the implied warranty of // You can do whatever you want with this file.
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -7,17 +7,10 @@
/// and/or Uncompressed Size values are stored in the Block Header. /// and/or Uncompressed Size values are stored in the Block Header.
/// As of writing there's no such Stream encoder in liblzma. /// As of writing there's no such Stream encoder in liblzma.
// //
// Copyright (C) 2008 Lasse Collin // Author: Lasse Collin
// //
// This library is free software; you can redistribute it and/or // This file has been put into the public domain.
// modify it under the terms of the GNU Lesser General Public // You can do whatever you want with this file.
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -2,18 +2,11 @@
// //
/// \file memusage.c /// \file memusage.c
/// \brief Calculates memory usage using lzma_memory_usage() /// \brief Calculates memory usage using lzma_memory_usage()
///
// Copyright (C) 2008 Lasse Collin
// //
// This library is free software; you can redistribute it and/or // Author: Lasse Collin
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
// //
// This library is distributed in the hope that it will be useful, // This file has been put into the public domain.
// but WITHOUT ANY WARRANTY; without even the implied warranty of // You can do whatever you want with this file.
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -7,17 +7,10 @@
/// the Subblock filter, especially the condition when repeat count /// the Subblock filter, especially the condition when repeat count
/// doesn't fit into 28-bit integer. /// doesn't fit into 28-bit integer.
// //
// Copyright (C) 2008 Lasse Collin // Author: Lasse Collin
// //
// This library is free software; you can redistribute it and/or // This file has been put into the public domain.
// modify it under the terms of the GNU Lesser General Public // You can do whatever you want with this file.
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -3,17 +3,10 @@
/// \file sync_flush.c /// \file sync_flush.c
/// \brief Encode files using LZMA_SYNC_FLUSH /// \brief Encode files using LZMA_SYNC_FLUSH
// //
// Copyright (C) 2008 Lasse Collin // Author: Lasse Collin
// //
// This library is free software; you can redistribute it and/or // This file has been put into the public domain.
// modify it under the terms of the GNU Lesser General Public // You can do whatever you want with this file.
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -1,13 +1,6 @@
LZMA Utils FAQ XZ Utils FAQ
-------------- ============
Copyright (C) 2007 Lasse Collin
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.
Q: What are LZMA, LZMA Utils, lzma, .lzma, liblzma, LZMA SDK, LZMA_Alone, Q: What are LZMA, LZMA Utils, lzma, .lzma, liblzma, LZMA SDK, LZMA_Alone,
7-Zip and p7zip? 7-Zip and p7zip?
@ -198,32 +191,7 @@ A: BCJ filter is called "x86" in liblzma. BCJ2 is not included,
Q: Can I use LZMA in proprietary, non-free applications? Q: Can I use LZMA in proprietary, non-free applications?
A: liblzma is under the GNU LGPL version 2.1 or (at your opinion) any A: Yes. See the file COPYING for details.
later version. To summarise (*NOTE* This summary is not legally
binding, that is, it doesn't give you any extra permissions compared
to the LGPL. Read the GNU LGPL carefully for the exact license
conditions.):
* All the changes made into the library itself must be published
under the same license.
* End users must be able to replace the used liblzma. Easiest way
to assure this is to link dynamically against liblzma so users
can replace the shared library file if they want.
* You must make it clear to your users, that your application uses
liblzma, and that liblzma is free software under the GNU LGPL.
A copy of GNU LGPL must be included.
LZMA SDK contains a special exception which allows linking *unmodified*
code statically with a non-free application. This exception does *not*
apply to liblzma.
As an alternative, you can support the development of LZMA and 7-Zip
by buying a proprietary license from Igor Pavlov. See homepage of
LZMA SDK <http://7-zip.org/sdk.html> for more information. Note that
having a proprietary license from Igor Pavlov doesn't allow you to use
liblzma in a way that contradicts with the GNU LGPL, because liblzma
contains code that is not copyrighted by Igor Pavlov. Please contact
both Lasse Collin and Igor Pavlov if the license conditions of liblzma
are not suitable for you.
Q: I would like to help. What can I do? Q: I would like to help. What can I do?

View File

@ -1,15 +1,8 @@
## ##
## Copyright (C) 2007 Lasse Collin ## Author: Lasse Collin
## ##
## This library is free software; you can redistribute it and/or ## This file has been put into the public domain.
## modify it under the terms of the GNU Lesser General Public ## You can do whatever you want with this file.
## License as published by the Free Software Foundation; either
## version 2.1 of the License, or (at your option) any later version.
##
## This library is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
## Lesser General Public License for more details.
## ##
SUBDIRS = liblzma xz xzdec scripts SUBDIRS = liblzma xz xzdec scripts

View File

@ -3,11 +3,10 @@
/// \file bswap.h /// \file bswap.h
/// \brief Byte swapping /// \brief Byte swapping
// //
// This code has been put into the public domain. // Author: Lasse Collin
// //
// This library is distributed in the hope that it will be useful, // This file has been put into the public domain.
// but WITHOUT ANY WARRANTY; without even the implied warranty of // You can do whatever you want with this file.
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -3,11 +3,10 @@
/// \file cpucores.h /// \file cpucores.h
/// \brief Get the number of online CPU cores /// \brief Get the number of online CPU cores
// //
// This code has been put into the public domain. // Author: Lasse Collin
// //
// This library is distributed in the hope that it will be useful, // This file has been put into the public domain.
// but WITHOUT ANY WARRANTY; without even the implied warranty of // You can do whatever you want with this file.
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -3,11 +3,10 @@
/// \file integer.h /// \file integer.h
/// \brief Reading and writing integers from and to buffers /// \brief Reading and writing integers from and to buffers
// //
// This code has been put into the public domain. // Author: Lasse Collin
// //
// This library is distributed in the hope that it will be useful, // This file has been put into the public domain.
// but WITHOUT ANY WARRANTY; without even the implied warranty of // You can do whatever you want with this file.
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -4,7 +4,9 @@
/// \brief Wrappers for threads /// \brief Wrappers for threads
// //
// Author: Lasse Collin // Author: Lasse Collin
//
// This file has been put into the public domain. // This file has been put into the public domain.
// You can do whatever you want with this file.
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -3,11 +3,10 @@
/// \file open_stdxxx.h /// \file open_stdxxx.h
/// \brief Make sure that file descriptors 0, 1, and 2 are open /// \brief Make sure that file descriptors 0, 1, and 2 are open
// //
// This code has been put into the public domain. // Author: Lasse Collin
// //
// This library is distributed in the hope that it will be useful, // This file has been put into the public domain.
// but WITHOUT ANY WARRANTY; without even the implied warranty of // You can do whatever you want with this file.
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -3,11 +3,10 @@
/// \file physmem.h /// \file physmem.h
/// \brief Get the amount of physical memory /// \brief Get the amount of physical memory
// //
// This code has been put into the public domain. // Author: Lasse Collin
// //
// This library is distributed in the hope that it will be useful, // This file has been put into the public domain.
// but WITHOUT ANY WARRANTY; without even the implied warranty of // You can do whatever you want with this file.
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -6,17 +6,10 @@
/// This file is used also by the lzma command line tool, that's why this /// This file is used also by the lzma command line tool, that's why this
/// file is separate from common.h. /// file is separate from common.h.
// //
// Copyright (C) 2007 Lasse Collin // Author: Lasse Collin
// //
// This library is free software; you can redistribute it and/or // This file has been put into the public domain.
// modify it under the terms of the GNU Lesser General Public // You can do whatever you want with this file.
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -1,15 +1,8 @@
## ##
## Copyright (C) 2007 Lasse Collin ## Author: Lasse Collin
## ##
## This library is free software; you can redistribute it and/or ## This file has been put into the public domain.
## modify it under the terms of the GNU Lesser General Public ## You can do whatever you want with this file.
## License as published by the Free Software Foundation; either
## version 2.1 of the License, or (at your option) any later version.
##
## This library is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
## Lesser General Public License for more details.
## ##
SUBDIRS = api common check SUBDIRS = api common check

View File

@ -1,15 +1,8 @@
## ##
## Copyright (C) 2007 Lasse Collin ## Author: Lasse Collin
## ##
## This library is free software; you can redistribute it and/or ## This file has been put into the public domain.
## modify it under the terms of the GNU Lesser General Public ## You can do whatever you want with this file.
## License as published by the Free Software Foundation; either
## version 2.1 of the License, or (at your option) any later version.
##
## This library is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
## Lesser General Public License for more details.
## ##
nobase_include_HEADERS = \ nobase_include_HEADERS = \

View File

@ -1,22 +1,30 @@
/** /**
* \file lzma.h * \file api/lzma.h
* \brief The public API of liblzma * \brief The public API of liblzma data compression library
* *
* liblzma is a LZMA compression library with a zlib-like API. * liblzma is a public domain general-purpose data compression library with
* liblzma is based on LZMA SDK found from http://7-zip.org/sdk.html. * a zlib-like API. The native file format is .xz, but also the old .lzma
* format and raw (no headers) streams are supported. Multiple compression
* algorithms (filters) are supported. Currently LZMA2 is the primary filter.
* *
* \author Copyright (C) 1999-2006 Igor Pavlov * liblzma is part of XZ Utils <http://tukaani.org/xz/>. XZ Utils includes
* \author Copyright (C) 2007 Lasse Collin * a gzip-like command line tool named xz and some other tools. XZ Utils
* is developed and maintained by Lasse Collin.
* *
* This library is free software; you can redistribute it and/or * Major parts of liblzma are based on Igor Pavlov's public domain LZMA SDK
* modify it under the terms of the GNU Lesser General Public * <http://7-zip.org/sdk.html>.
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
* *
* This library is distributed in the hope that it will be useful, * The SHA-256 implementation is based on the public domain code found from
* but WITHOUT ANY WARRANTY; without even the implied warranty of * 7-Zip <http://7-zip.org/>, which has a modified version of the public
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * domain SHA-256 code found from Crypto++ <http://www.cryptopp.com/>.
* Lesser General Public License for more details. * The SHA-256 code in Crypto++ was written by Kevin Springle and Wei Dai.
*/
/*
* Author: Lasse Collin
*
* This file has been put into the public domain.
* You can do whatever you want with this file.
*/ */
#ifndef LZMA_H #ifndef LZMA_H
@ -26,7 +34,7 @@
* Required standard headers * * Required standard headers *
*****************************/ *****************************/
/** /*
* liblzma API headers need some standard types and macros. To allow * liblzma API headers need some standard types and macros. To allow
* including lzma.h without requiring the application to include other * including lzma.h without requiring the application to include other
* headers first, lzma.h includes the required standard headers unless * headers first, lzma.h includes the required standard headers unless

View File

@ -1,19 +1,15 @@
/** /**
* \file lzma/base.h * \file lzma/base.h
* \brief Data types and functions used in many places of the public API * \brief Data types and functions used in many places in liblzma API
*/
/*
* Author: Lasse Collin
* *
* \author Copyright (C) 1999-2006 Igor Pavlov * This file has been put into the public domain.
* \author Copyright (C) 2007 Lasse Collin * You can do whatever you want with this file.
* *
* This library is free software; you can redistribute it and/or * See ../lzma.h for information about liblzma as a whole.
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*/ */
#ifndef LZMA_H_INTERNAL #ifndef LZMA_H_INTERNAL

View File

@ -1,19 +1,15 @@
/** /**
* \file lzma/bcj.h * \file lzma/bcj.h
* \brief Branch/Call/Jump conversion filters * \brief Branch/Call/Jump conversion filters
*/
/*
* Author: Lasse Collin
* *
* \author Copyright (C) 1999-2006 Igor Pavlov * This file has been put into the public domain.
* \author Copyright (C) 2007 Lasse Collin * You can do whatever you want with this file.
* *
* This library is free software; you can redistribute it and/or * See ../lzma.h for information about liblzma as a whole.
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*/ */
#ifndef LZMA_H_INTERNAL #ifndef LZMA_H_INTERNAL

View File

@ -1,19 +1,15 @@
/** /**
* \file lzma/block.h * \file lzma/block.h
* \brief .xz Block handling * \brief .xz Block handling
*/
/*
* Author: Lasse Collin
* *
* \author Copyright (C) 1999-2006 Igor Pavlov * This file has been put into the public domain.
* \author Copyright (C) 2007 Lasse Collin * You can do whatever you want with this file.
* *
* This library is free software; you can redistribute it and/or * See ../lzma.h for information about liblzma as a whole.
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*/ */
#ifndef LZMA_H_INTERNAL #ifndef LZMA_H_INTERNAL

View File

@ -1,19 +1,15 @@
/** /**
* \file lzma/check.h * \file lzma/check.h
* \brief Integrity checks * \brief Integrity checks
*/
/*
* Author: Lasse Collin
* *
* \author Copyright (C) 1999-2006 Igor Pavlov * This file has been put into the public domain.
* \author Copyright (C) 2007 Lasse Collin * You can do whatever you want with this file.
* *
* This library is free software; you can redistribute it and/or * See ../lzma.h for information about liblzma as a whole.
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*/ */
#ifndef LZMA_H_INTERNAL #ifndef LZMA_H_INTERNAL

View File

@ -1,19 +1,15 @@
/** /**
* \file lzma/container.h * \file lzma/container.h
* \brief File formats * \brief File formats
*/
/*
* Author: Lasse Collin
* *
* \author Copyright (C) 1999-2008 Igor Pavlov * This file has been put into the public domain.
* \author Copyright (C) 2007-2008 Lasse Collin * You can do whatever you want with this file.
* *
* This library is free software; you can redistribute it and/or * See ../lzma.h for information about liblzma as a whole.
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*/ */
#ifndef LZMA_H_INTERNAL #ifndef LZMA_H_INTERNAL

View File

@ -1,19 +1,15 @@
/** /**
* \file lzma/delta.h * \file lzma/delta.h
* \brief Delta filter * \brief Delta filter
*/
/*
* Author: Lasse Collin
* *
* \author Copyright (C) 1999-2006 Igor Pavlov * This file has been put into the public domain.
* \author Copyright (C) 2007 Lasse Collin * You can do whatever you want with this file.
* *
* This library is free software; you can redistribute it and/or * See ../lzma.h for information about liblzma as a whole.
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*/ */
#ifndef LZMA_H_INTERNAL #ifndef LZMA_H_INTERNAL

View File

@ -1,19 +1,15 @@
/** /**
* \file lzma/filter.h * \file lzma/filter.h
* \brief Common filter related types * \brief Common filter related types
*/
/*
* Author: Lasse Collin
* *
* \author Copyright (C) 1999-2006 Igor Pavlov * This file has been put into the public domain.
* \author Copyright (C) 2007 Lasse Collin * You can do whatever you want with this file.
* *
* This library is free software; you can redistribute it and/or * See ../lzma.h for information about liblzma as a whole.
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*/ */
#ifndef LZMA_H_INTERNAL #ifndef LZMA_H_INTERNAL

View File

@ -1,19 +1,15 @@
/** /**
* \file lzma/index.h * \file lzma/index.h
* \brief Handling of .xz Index lists * \brief Handling of .xz Index lists
*/
/*
* Author: Lasse Collin
* *
* \author Copyright (C) 1999-2006 Igor Pavlov * This file has been put into the public domain.
* \author Copyright (C) 2007 Lasse Collin * You can do whatever you want with this file.
* *
* This library is free software; you can redistribute it and/or * See ../lzma.h for information about liblzma as a whole.
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*/ */
#ifndef LZMA_H_INTERNAL #ifndef LZMA_H_INTERNAL

View File

@ -1,23 +1,15 @@
/** /**
* \file lzma/index_hash.h * \file lzma/index_hash.h
* \brief Validates Index by using a hash function * \brief Validates Index by using a hash function
*/
/*
* Author: Lasse Collin
* *
* Instead of constructing complete Index while decoding Blocks, Index hash * This file has been put into the public domain.
* calculates a hash of the Block sizes and Index, and then compares the * You can do whatever you want with this file.
* hashes. This way memory usage is constant even with large number of
* Blocks and huge Index.
* *
* \author Copyright (C) 2008 Lasse Collin * See ../lzma.h for information about liblzma as a whole.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*/ */
#ifndef LZMA_H_INTERNAL #ifndef LZMA_H_INTERNAL

View File

@ -1,19 +1,15 @@
/** /**
* \file lzma/lzma.h * \file lzma/lzma.h
* \brief LZMA1 and LZMA2 filters * \brief LZMA1 and LZMA2 filters
*/
/*
* Author: Lasse Collin
* *
* \author Copyright (C) 1999-2006 Igor Pavlov * This file has been put into the public domain.
* \author Copyright (C) 2007 Lasse Collin * You can do whatever you want with this file.
* *
* This library is free software; you can redistribute it and/or * See ../lzma.h for information about liblzma as a whole.
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*/ */
#ifndef LZMA_H_INTERNAL #ifndef LZMA_H_INTERNAL

View File

@ -1,19 +1,15 @@
/** /**
* \file lzma/stream_flags.h * \file lzma/stream_flags.h
* \brief .xz Stream Header and Stream Footer encoder and decoder * \brief .xz Stream Header and Stream Footer encoder and decoder
*/
/*
* Author: Lasse Collin
* *
* \author Copyright (C) 1999-2006 Igor Pavlov * This file has been put into the public domain.
* \author Copyright (C) 2007 Lasse Collin * You can do whatever you want with this file.
* *
* This library is free software; you can redistribute it and/or * See ../lzma.h for information about liblzma as a whole.
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*/ */
#ifndef LZMA_H_INTERNAL #ifndef LZMA_H_INTERNAL

View File

@ -1,19 +1,15 @@
/** /**
* \file lzma/subblock.h * \file lzma/subblock.h
* \brief Subblock filter * \brief Subblock filter
*/
/*
* Author: Lasse Collin
* *
* \author Copyright (C) 1999-2006 Igor Pavlov * This file has been put into the public domain.
* \author Copyright (C) 2007 Lasse Collin * You can do whatever you want with this file.
* *
* This library is free software; you can redistribute it and/or * See ../lzma.h for information about liblzma as a whole.
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*/ */
#ifndef LZMA_H_INTERNAL #ifndef LZMA_H_INTERNAL

View File

@ -1,19 +1,15 @@
/** /**
* \file lzma/version.h * \file lzma/version.h
* \brief Version number * \brief Version number
*/
/*
* Author: Lasse Collin
* *
* \author Copyright (C) 1999-2006 Igor Pavlov * This file has been put into the public domain.
* \author Copyright (C) 2007 Lasse Collin * You can do whatever you want with this file.
* *
* This library is free software; you can redistribute it and/or * See ../lzma.h for information about liblzma as a whole.
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*/ */
#ifndef LZMA_H_INTERNAL #ifndef LZMA_H_INTERNAL

View File

@ -2,18 +2,25 @@
* \file lzma/vli.h * \file lzma/vli.h
* \brief Variable-length integer handling * \brief Variable-length integer handling
* *
* \author Copyright (C) 1999-2006 Igor Pavlov * In the .xz format, most integers are encoded in a variable-length
* \author Copyright (C) 2007 Lasse Collin * representation, which is sometimes called little endian base-128 encoding.
* This saves space when smaller values are more likely than bigger values.
* *
* This library is free software; you can redistribute it and/or * The encoding scheme encodes seven bits to every byte, using minimum
* modify it under the terms of the GNU Lesser General Public * number of bytes required to represent the given value. Encodings that use
* License as published by the Free Software Foundation; either * non-minimum number of bytes are invalid, thus every integer has exactly
* version 2.1 of the License, or (at your option) any later version. * one encoded representation. The maximum number of bits in a VLI is 63,
* thus the vli argument must be at maximum of UINT64_MAX / 2. You should
* use LZMA_VLI_MAX for clarity.
*/
/*
* Author: Lasse Collin
* *
* This library is distributed in the hope that it will be useful, * This file has been put into the public domain.
* but WITHOUT ANY WARRANTY; without even the implied warranty of * You can do whatever you want with this file.
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
* Lesser General Public License for more details. * See ../lzma.h for information about liblzma as a whole.
*/ */
#ifndef LZMA_H_INTERNAL #ifndef LZMA_H_INTERNAL
@ -71,18 +78,7 @@ typedef uint64_t lzma_vli;
/** /**
* \brief Encodes variable-length integer * \brief Encode a variable-length integer
*
* In the .xz format, most integers are encoded in a variable-length
* representation, which is sometimes called little endian base-128 encoding.
* This saves space when smaller values are more likely than bigger values.
*
* The encoding scheme encodes seven bits to every byte, using minimum
* number of bytes required to represent the given value. Encodings that use
* non-minimum number of bytes are invalid, thus every integer has exactly
* one encoded representation. The maximum number of bits in a VLI is 63,
* thus the vli argument must be at maximum of UINT64_MAX / 2. You should
* use LZMA_VLI_MAX for clarity.
* *
* This function has two modes: single-call and multi-call. Single-call mode * This function has two modes: single-call and multi-call. Single-call mode
* encodes the whole integer at once; it is an error if the output buffer is * encodes the whole integer at once; it is an error if the output buffer is
@ -123,7 +119,7 @@ extern LZMA_API(lzma_ret) lzma_vli_encode(lzma_vli vli,
/** /**
* \brief Decodes variable-length integer * \brief Decode a variable-length integer
* *
* Like lzma_vli_encode(), this function has single-call and multi-call modes. * Like lzma_vli_encode(), this function has single-call and multi-call modes.
* *

View File

@ -1,10 +1,8 @@
## ##
## This code has been put into the public domain. ## Author: Lasse Collin
## ##
## This library is distributed in the hope that it will be useful, ## This file has been put into the public domain.
## but WITHOUT ANY WARRANTY; without even the implied warranty of ## You can do whatever you want with this file.
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
## Lesser General Public License for more details.
## ##
EXTRA_DIST = crc32_tablegen.c crc64_tablegen.c EXTRA_DIST = crc32_tablegen.c crc64_tablegen.c

View File

@ -3,11 +3,10 @@
/// \file check.c /// \file check.c
/// \brief Single API to access different integrity checks /// \brief Single API to access different integrity checks
// //
// This code has been put into the public domain. // Author: Lasse Collin
// //
// This library is distributed in the hope that it will be useful, // This file has been put into the public domain.
// but WITHOUT ANY WARRANTY; without even the implied warranty of // You can do whatever you want with this file.
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -3,11 +3,10 @@
/// \file check.h /// \file check.h
/// \brief Internal API to different integrity check functions /// \brief Internal API to different integrity check functions
// //
// This code has been put into the public domain. // Author: Lasse Collin
// //
// This library is distributed in the hope that it will be useful, // This file has been put into the public domain.
// but WITHOUT ANY WARRANTY; without even the implied warranty of // You can do whatever you want with this file.
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -2,12 +2,17 @@
// //
/// \file crc32.c /// \file crc32.c
/// \brief CRC32 calculation /// \brief CRC32 calculation
///
/// Calculate the CRC32 using the slice-by-eight algorithm.
/// It is explained in this document:
/// http://www.intel.com/technology/comms/perfnet/download/CRC_generators.pdf
/// The code in this file is not the same as in Intel's paper, but
/// the basic principle is identical.
// //
// This code has been put into the public domain. // Author: Lasse Collin
// //
// This library is distributed in the hope that it will be useful, // This file has been put into the public domain.
// but WITHOUT ANY WARRANTY; without even the implied warranty of // You can do whatever you want with this file.
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
@ -43,17 +48,6 @@ lzma_crc32(const uint8_t *buf, size_t size, uint32_t crc)
size &= (size_t)(7); size &= (size_t)(7);
// Calculate the CRC32 using the slice-by-eight algorithm. // Calculate the CRC32 using the slice-by-eight algorithm.
// It is explained in this document:
// http://www.intel.com/technology/comms/perfnet/download/CRC_generators.pdf
//
// The code below is different than the code in Intel's
// paper, but the principle is identical. This should be
// faster with GCC than Intel's code. This is tested only
// with GCC 3.4.6 and 4.1.2 on x86, so your results may vary.
//
// Using -Os and -fomit-frame-pointer seem to give the best
// results at least with GCC 4.1.2 on x86. It's sill far
// from the speed of hand-optimized assembler.
while (buf < limit) { while (buf < limit) {
crc ^= *(uint32_t *)(buf); crc ^= *(uint32_t *)(buf);
buf += 4; buf += 4;
@ -66,9 +60,9 @@ lzma_crc32(const uint8_t *buf, size_t size, uint32_t crc)
const uint32_t tmp = *(uint32_t *)(buf); const uint32_t tmp = *(uint32_t *)(buf);
buf += 4; buf += 4;
// It is critical for performance, that // At least with some compilers, it is critical for
// the crc variable is XORed between the // performance, that the crc variable is XORed
// two table-lookup pairs. // between the two table-lookup pairs.
crc = lzma_crc32_table[3][A(tmp)] crc = lzma_crc32_table[3][A(tmp)]
^ lzma_crc32_table[2][B(tmp)] ^ lzma_crc32_table[2][B(tmp)]
^ crc ^ crc

View File

@ -3,11 +3,10 @@
/// \file crc32_small.c /// \file crc32_small.c
/// \brief CRC32 calculation (size-optimized) /// \brief CRC32 calculation (size-optimized)
// //
// This code has been put into the public domain. // Author: Lasse Collin
// //
// This library is distributed in the hope that it will be useful, // This file has been put into the public domain.
// but WITHOUT ANY WARRANTY; without even the implied warranty of // You can do whatever you want with this file.
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -3,11 +3,10 @@
/// \file crc32_table.c /// \file crc32_table.c
/// \brief Precalculated CRC32 table with correct endianness /// \brief Precalculated CRC32 table with correct endianness
// //
// This code has been put into the public domain. // Author: Lasse Collin
// //
// This library is distributed in the hope that it will be useful, // This file has been put into the public domain.
// but WITHOUT ANY WARRANTY; without even the implied warranty of // You can do whatever you want with this file.
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -6,11 +6,10 @@
/// Compiling: gcc -std=c99 -o crc32_tablegen crc32_tablegen.c /// Compiling: gcc -std=c99 -o crc32_tablegen crc32_tablegen.c
/// Add -DWORDS_BIGENDIAN to generate big endian table. /// Add -DWORDS_BIGENDIAN to generate big endian table.
// //
// This code has been put into the public domain. // Author: Lasse Collin
// //
// This library is distributed in the hope that it will be useful, // This file has been put into the public domain.
// but WITHOUT ANY WARRANTY; without even the implied warranty of // You can do whatever you want with this file.
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -1,11 +1,18 @@
/* /*
* Speed-optimized CRC32 using slicing-by-eight algorithm * Speed-optimized CRC32 using slicing-by-eight algorithm
* Instruction set: i386
* Optimized for: i686
* *
* This code has been put into the public domain by its authors: * This uses only i386 instructions, but it is optimized for i686 and later
* Original code by Igor Pavlov <http://7-zip.org/> * (including e.g. Pentium II/III/IV, Athlon XP, and Core 2). For i586
* Position-independent version by Lasse Collin <lasse.collin@tukaani.org> * (e.g. Pentium), slicing-by-four would be better, and even the C version
* of slicing-by-eight built with gcc -march=i586 tends to be a little bit
* better than this. Very few probably run this code on i586 or older x86
* so this shouldn't be a problem in practice.
*
* Authors: Igor Pavlov (original version)
* Lasse Collin (AT&T syntax, PIC support, better portability)
*
* This file has been put into the public domain.
* You can do whatever you want with this file.
* *
* This code needs lzma_crc32_table, which can be created using the * This code needs lzma_crc32_table, which can be created using the
* following C code: * following C code:
@ -15,10 +22,10 @@ uint32_t lzma_crc32_table[8][256];
void void
init_table(void) init_table(void)
{ {
// IEEE-802.3 (CRC32) // IEEE-802.3
static const uint32_t poly32 = UINT32_C(0xEDB88320); static const uint32_t poly32 = UINT32_C(0xEDB88320);
// Castagnoli (CRC32C) // Castagnoli
// static const uint32_t poly32 = UINT32_C(0x82F63B78); // static const uint32_t poly32 = UINT32_C(0x82F63B78);
// Koopman // Koopman

View File

@ -2,12 +2,15 @@
// //
/// \file crc64.c /// \file crc64.c
/// \brief CRC64 calculation /// \brief CRC64 calculation
///
/// Calculate the CRC64 using the slice-by-four algorithm. This is the same
/// idea that is used in crc32_fast.c, but for CRC64 we use only four tables
/// instead of eight to avoid increasing CPU cache usage.
// //
// This code has been put into the public domain. // Author: Lasse Collin
// //
// This library is distributed in the hope that it will be useful, // This file has been put into the public domain.
// but WITHOUT ANY WARRANTY; without even the implied warranty of // You can do whatever you want with this file.
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
@ -22,7 +25,7 @@
#endif #endif
// See comments in crc32.c. // See the comments in crc32_fast.c. They aren't duplicated here.
extern LZMA_API(uint64_t) extern LZMA_API(uint64_t)
lzma_crc64(const uint8_t *buf, size_t size, uint64_t crc) lzma_crc64(const uint8_t *buf, size_t size, uint64_t crc)
{ {
@ -41,10 +44,6 @@ lzma_crc64(const uint8_t *buf, size_t size, uint64_t crc)
const uint8_t *const limit = buf + (size & ~(size_t)(3)); const uint8_t *const limit = buf + (size & ~(size_t)(3));
size &= (size_t)(3); size &= (size_t)(3);
// Calculate the CRC64 using the slice-by-four algorithm.
//
// In contrast to CRC32 code, this one seems to be fastest
// with -O3 -fomit-frame-pointer.
while (buf < limit) { while (buf < limit) {
#ifdef WORDS_BIGENDIAN #ifdef WORDS_BIGENDIAN
const uint32_t tmp = (crc >> 32) ^ *(uint32_t *)(buf); const uint32_t tmp = (crc >> 32) ^ *(uint32_t *)(buf);
@ -53,9 +52,6 @@ lzma_crc64(const uint8_t *buf, size_t size, uint64_t crc)
#endif #endif
buf += 4; buf += 4;
// It is critical for performance, that
// the crc variable is XORed between the
// two table-lookup pairs.
crc = lzma_crc64_table[3][A(tmp)] crc = lzma_crc64_table[3][A(tmp)]
^ lzma_crc64_table[2][B(tmp)] ^ lzma_crc64_table[2][B(tmp)]
^ S32(crc) ^ S32(crc)

View File

@ -3,11 +3,10 @@
/// \file crc64_small.c /// \file crc64_small.c
/// \brief CRC64 calculation (size-optimized) /// \brief CRC64 calculation (size-optimized)
// //
// This code has been put into the public domain. // Author: Lasse Collin
// //
// This library is distributed in the hope that it will be useful, // This file has been put into the public domain.
// but WITHOUT ANY WARRANTY; without even the implied warranty of // You can do whatever you want with this file.
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -3,11 +3,10 @@
/// \file crc64_table.c /// \file crc64_table.c
/// \brief Precalculated CRC64 table with correct endianness /// \brief Precalculated CRC64 table with correct endianness
// //
// This code has been put into the public domain. // Author: Lasse Collin
// //
// This library is distributed in the hope that it will be useful, // This file has been put into the public domain.
// but WITHOUT ANY WARRANTY; without even the implied warranty of // You can do whatever you want with this file.
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -6,11 +6,10 @@
/// Compiling: gcc -std=c99 -o crc64_tablegen crc64_tablegen.c /// Compiling: gcc -std=c99 -o crc64_tablegen crc64_tablegen.c
/// Add -DWORDS_BIGENDIAN to generate big endian table. /// Add -DWORDS_BIGENDIAN to generate big endian table.
// //
// This code has been put into the public domain. // Author: Lasse Collin
// //
// This library is distributed in the hope that it will be useful, // This file has been put into the public domain.
// but WITHOUT ANY WARRANTY; without even the implied warranty of // You can do whatever you want with this file.
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -1,11 +1,14 @@
/* /*
* Speed-optimized CRC64 using slicing-by-four algorithm * Speed-optimized CRC64 using slicing-by-four algorithm
* Instruction set: i386
* Optimized for: i686
* *
* This code has been put into the public domain by its authors: * This uses only i386 instructions, but it is optimized for i686 and later
* Igor Pavlov <http://7-zip.org/> * (including e.g. Pentium II/III/IV, Athlon XP, and Core 2).
* Lasse Collin <lasse.collin@tukaani.org> *
* Authors: Igor Pavlov (original CRC32 assembly code)
* Lasse Collin (CRC64 adaptation of the modified CRC32 code)
*
* This file has been put into the public domain.
* You can do whatever you want with this file.
* *
* This code needs lzma_crc64_table, which can be created using the * This code needs lzma_crc64_table, which can be created using the
* following C code: * following C code:
@ -15,6 +18,7 @@ uint64_t lzma_crc64_table[4][256];
void void
init_table(void) init_table(void)
{ {
// ECMA-182
static const uint64_t poly64 = UINT64_C(0xC96C5795D7870F42); static const uint64_t poly64 = UINT64_C(0xC96C5795D7870F42);
for (size_t s = 0; s < 4; ++s) { for (size_t s = 0; s < 4; ++s) {

View File

@ -1,13 +1,12 @@
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// //
/// \file crc_macros /// \file crc_macros.h
/// \brief Some endian-dependent macros for CRC32 and CRC64 /// \brief Some endian-dependent macros for CRC32 and CRC64
// //
// This code has been put into the public domain. // Author: Lasse Collin
// //
// This library is distributed in the hope that it will be useful, // This file has been put into the public domain.
// but WITHOUT ANY WARRANTY; without even the implied warranty of // You can do whatever you want with this file.
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -1,19 +1,24 @@
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// //
/// \file sha256.c /// \file sha256.c
/// \brief SHA256 /// \brief SHA-256
// ///
// Based on the public domain code found from Wei Dai's Crypto++ library
// version 5.5.1: http://www.cryptopp.com/
// This code has been put into the public domain.
//
/// \todo Crypto++ has x86 ASM optimizations. They use SSE so if they /// \todo Crypto++ has x86 ASM optimizations. They use SSE so if they
/// are imported to liblzma, SSE instructions need to be used /// are imported to liblzma, SSE instructions need to be used
/// conditionally to keep the code working on older boxes. /// conditionally to keep the code working on older boxes.
/// We could also support using some external libary for SHA-256.
// //
// This library is distributed in the hope that it will be useful, // This code is based on the code found from 7-Zip, which has a modified
// but WITHOUT ANY WARRANTY; without even the implied warranty of // version of the SHA-256 found from Crypto++ <http://www.cryptopp.com/>.
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. // The code was modified a little to fit into liblzma.
//
// Authors: Kevin Springle
// Wei Dai
// Igor Pavlov
// Lasse Collin
//
// This file has been put into the public domain.
// You can do whatever you want with this file.
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -1,15 +1,8 @@
## ##
## Copyright (C) 2007 Lasse Collin ## Author: Lasse Collin
## ##
## This library is free software; you can redistribute it and/or ## This file has been put into the public domain.
## modify it under the terms of the GNU Lesser General Public ## You can do whatever you want with this file.
## License as published by the Free Software Foundation; either
## version 2.1 of the License, or (at your option) any later version.
##
## This library is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
## Lesser General Public License for more details.
## ##
noinst_LTLIBRARIES = libcommon.la noinst_LTLIBRARIES = libcommon.la

View File

@ -3,17 +3,10 @@
/// \file alone_decoder.c /// \file alone_decoder.c
/// \brief Decoder for LZMA_Alone files /// \brief Decoder for LZMA_Alone files
// //
// Copyright (C) 2007 Lasse Collin // Author: Lasse Collin
// //
// This library is free software; you can redistribute it and/or // This file has been put into the public domain.
// modify it under the terms of the GNU Lesser General Public // You can do whatever you want with this file.
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -3,17 +3,10 @@
/// \file alone_decoder.h /// \file alone_decoder.h
/// \brief Decoder for LZMA_Alone files /// \brief Decoder for LZMA_Alone files
// //
// Copyright (C) 2007 Lasse Collin // Author: Lasse Collin
// //
// This library is free software; you can redistribute it and/or // This file has been put into the public domain.
// modify it under the terms of the GNU Lesser General Public // You can do whatever you want with this file.
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -3,17 +3,10 @@
/// \file alone_decoder.c /// \file alone_decoder.c
/// \brief Decoder for LZMA_Alone files /// \brief Decoder for LZMA_Alone files
// //
// Copyright (C) 2007 Lasse Collin // Author: Lasse Collin
// //
// This library is free software; you can redistribute it and/or // This file has been put into the public domain.
// modify it under the terms of the GNU Lesser General Public // You can do whatever you want with this file.
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -3,17 +3,10 @@
/// \file auto_decoder.c /// \file auto_decoder.c
/// \brief Autodetect between .xz Stream and .lzma (LZMA_Alone) formats /// \brief Autodetect between .xz Stream and .lzma (LZMA_Alone) formats
// //
// Copyright (C) 2007 Lasse Collin // Author: Lasse Collin
// //
// This library is free software; you can redistribute it and/or // This file has been put into the public domain.
// modify it under the terms of the GNU Lesser General Public // You can do whatever you want with this file.
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -3,17 +3,10 @@
/// \file block_buffer_decoder.c /// \file block_buffer_decoder.c
/// \brief Single-call .xz Block decoder /// \brief Single-call .xz Block decoder
// //
// Copyright (C) 2009 Lasse Collin // Author: Lasse Collin
// //
// This library is free software; you can redistribute it and/or // This file has been put into the public domain.
// modify it under the terms of the GNU Lesser General Public // You can do whatever you want with this file.
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -3,17 +3,10 @@
/// \file block_buffer_encoder.c /// \file block_buffer_encoder.c
/// \brief Single-call .xz Block encoder /// \brief Single-call .xz Block encoder
// //
// Copyright (C) 2009 Lasse Collin // Author: Lasse Collin
// //
// This library is free software; you can redistribute it and/or // This file has been put into the public domain.
// modify it under the terms of the GNU Lesser General Public // You can do whatever you want with this file.
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -3,17 +3,10 @@
/// \file block_decoder.c /// \file block_decoder.c
/// \brief Decodes .xz Blocks /// \brief Decodes .xz Blocks
// //
// Copyright (C) 2007 Lasse Collin // Author: Lasse Collin
// //
// This library is free software; you can redistribute it and/or // This file has been put into the public domain.
// modify it under the terms of the GNU Lesser General Public // You can do whatever you want with this file.
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -3,17 +3,10 @@
/// \file block_decoder.h /// \file block_decoder.h
/// \brief Decodes .xz Blocks /// \brief Decodes .xz Blocks
// //
// Copyright (C) 2007 Lasse Collin // Author: Lasse Collin
// //
// This library is free software; you can redistribute it and/or // This file has been put into the public domain.
// modify it under the terms of the GNU Lesser General Public // You can do whatever you want with this file.
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -3,17 +3,10 @@
/// \file block_encoder.c /// \file block_encoder.c
/// \brief Encodes .xz Blocks /// \brief Encodes .xz Blocks
// //
// Copyright (C) 2007 Lasse Collin // Author: Lasse Collin
// //
// This library is free software; you can redistribute it and/or // This file has been put into the public domain.
// modify it under the terms of the GNU Lesser General Public // You can do whatever you want with this file.
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -3,17 +3,10 @@
/// \file block_encoder.h /// \file block_encoder.h
/// \brief Encodes .xz Blocks /// \brief Encodes .xz Blocks
// //
// Copyright (C) 2007 Lasse Collin // Author: Lasse Collin
// //
// This library is free software; you can redistribute it and/or // This file has been put into the public domain.
// modify it under the terms of the GNU Lesser General Public // You can do whatever you want with this file.
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -3,17 +3,10 @@
/// \file block_header_decoder.c /// \file block_header_decoder.c
/// \brief Decodes Block Header from .xz files /// \brief Decodes Block Header from .xz files
// //
// Copyright (C) 2007 Lasse Collin // Author: Lasse Collin
// //
// This library is free software; you can redistribute it and/or // This file has been put into the public domain.
// modify it under the terms of the GNU Lesser General Public // You can do whatever you want with this file.
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -3,17 +3,10 @@
/// \file block_header_encoder.c /// \file block_header_encoder.c
/// \brief Encodes Block Header for .xz files /// \brief Encodes Block Header for .xz files
// //
// Copyright (C) 2007 Lasse Collin // Author: Lasse Collin
// //
// This library is free software; you can redistribute it and/or // This file has been put into the public domain.
// modify it under the terms of the GNU Lesser General Public // You can do whatever you want with this file.
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -3,17 +3,10 @@
/// \file block_header.c /// \file block_header.c
/// \brief Utility functions to handle lzma_block /// \brief Utility functions to handle lzma_block
// //
// Copyright (C) 2008 Lasse Collin // Author: Lasse Collin
// //
// This library is free software; you can redistribute it and/or // This file has been put into the public domain.
// modify it under the terms of the GNU Lesser General Public // You can do whatever you want with this file.
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -3,11 +3,10 @@
/// \file bsr.h /// \file bsr.h
/// \brief Bit scan reverse /// \brief Bit scan reverse
// //
// This code has been put into the public domain. // Author: Lasse Collin
// //
// This library is distributed in the hope that it will be useful, // This file has been put into the public domain.
// but WITHOUT ANY WARRANTY; without even the implied warranty of // You can do whatever you want with this file.
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -3,17 +3,10 @@
/// \file chunk_size.c /// \file chunk_size.c
/// \brief Finds out the minimal reasonable chunk size for a filter chain /// \brief Finds out the minimal reasonable chunk size for a filter chain
// //
// Copyright (C) 2007 Lasse Collin // Author: Lasse Collin
// //
// This library is free software; you can redistribute it and/or // This file has been put into the public domain.
// modify it under the terms of the GNU Lesser General Public // You can do whatever you want with this file.
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -3,17 +3,10 @@
/// \file common.h /// \file common.h
/// \brief Common functions needed in many places in liblzma /// \brief Common functions needed in many places in liblzma
// //
// Copyright (C) 2007-2008 Lasse Collin // Author: Lasse Collin
// //
// This library is free software; you can redistribute it and/or // This file has been put into the public domain.
// modify it under the terms of the GNU Lesser General Public // You can do whatever you want with this file.
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -3,17 +3,10 @@
/// \file common.h /// \file common.h
/// \brief Definitions common to the whole liblzma library /// \brief Definitions common to the whole liblzma library
// //
// Copyright (C) 2007-2008 Lasse Collin // Author: Lasse Collin
// //
// This library is free software; you can redistribute it and/or // This file has been put into the public domain.
// modify it under the terms of the GNU Lesser General Public // You can do whatever you want with this file.
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -3,17 +3,10 @@
/// \file easy_buffer_encoder.c /// \file easy_buffer_encoder.c
/// \brief Easy single-call .xz Stream encoder /// \brief Easy single-call .xz Stream encoder
// //
// Copyright (C) 2009 Lasse Collin // Author: Lasse Collin
// //
// This library is free software; you can redistribute it and/or // This file has been put into the public domain.
// modify it under the terms of the GNU Lesser General Public // You can do whatever you want with this file.
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -3,17 +3,10 @@
/// \file easy_decoder_memusage.c /// \file easy_decoder_memusage.c
/// \brief Decoder memory usage calculation to match easy encoder presets /// \brief Decoder memory usage calculation to match easy encoder presets
// //
// Copyright (C) 2008 Lasse Collin // Author: Lasse Collin
// //
// This library is free software; you can redistribute it and/or // This file has been put into the public domain.
// modify it under the terms of the GNU Lesser General Public // You can do whatever you want with this file.
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -3,17 +3,10 @@
/// \file easy_encoder.c /// \file easy_encoder.c
/// \brief Easy .xz Stream encoder initialization /// \brief Easy .xz Stream encoder initialization
// //
// Copyright (C) 2008 Lasse Collin // Author: Lasse Collin
// //
// This library is free software; you can redistribute it and/or // This file has been put into the public domain.
// modify it under the terms of the GNU Lesser General Public // You can do whatever you want with this file.
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -3,17 +3,10 @@
/// \file easy_encoder_memusage.c /// \file easy_encoder_memusage.c
/// \brief Easy .xz Stream encoder memory usage calculation /// \brief Easy .xz Stream encoder memory usage calculation
// //
// Copyright (C) 2008 Lasse Collin // Author: Lasse Collin
// //
// This library is free software; you can redistribute it and/or // This file has been put into the public domain.
// modify it under the terms of the GNU Lesser General Public // You can do whatever you want with this file.
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -3,17 +3,10 @@
/// \file easy_preset.c /// \file easy_preset.c
/// \brief Preset handling for easy encoder and decoder /// \brief Preset handling for easy encoder and decoder
// //
// Copyright (C) 2008 Lasse Collin // Author: Lasse Collin
// //
// This library is free software; you can redistribute it and/or // This file has been put into the public domain.
// modify it under the terms of the GNU Lesser General Public // You can do whatever you want with this file.
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -3,17 +3,10 @@
/// \file easy_preset.h /// \file easy_preset.h
/// \brief Preset handling for easy encoder and decoder /// \brief Preset handling for easy encoder and decoder
// //
// Copyright (C) 2009 Lasse Collin // Author: Lasse Collin
// //
// This library is free software; you can redistribute it and/or // This file has been put into the public domain.
// modify it under the terms of the GNU Lesser General Public // You can do whatever you want with this file.
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -3,17 +3,10 @@
/// \file filter_buffer_decoder.c /// \file filter_buffer_decoder.c
/// \brief Single-call raw decoding /// \brief Single-call raw decoding
// //
// Copyright (C) 2009 Lasse Collin // Author: Lasse Collin
// //
// This library is free software; you can redistribute it and/or // This file has been put into the public domain.
// modify it under the terms of the GNU Lesser General Public // You can do whatever you want with this file.
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -3,17 +3,10 @@
/// \file filter_buffer_encoder.c /// \file filter_buffer_encoder.c
/// \brief Single-call raw encoding /// \brief Single-call raw encoding
// //
// Copyright (C) 2009 Lasse Collin // Author: Lasse Collin
// //
// This library is free software; you can redistribute it and/or // This file has been put into the public domain.
// modify it under the terms of the GNU Lesser General Public // You can do whatever you want with this file.
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -3,17 +3,10 @@
/// \file filter_common.c /// \file filter_common.c
/// \brief Filter-specific stuff common for both encoder and decoder /// \brief Filter-specific stuff common for both encoder and decoder
// //
// Copyright (C) 2008 Lasse Collin // Author: Lasse Collin
// //
// This library is free software; you can redistribute it and/or // This file has been put into the public domain.
// modify it under the terms of the GNU Lesser General Public // You can do whatever you want with this file.
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -3,17 +3,10 @@
/// \file filter_common.c /// \file filter_common.c
/// \brief Filter-specific stuff common for both encoder and decoder /// \brief Filter-specific stuff common for both encoder and decoder
// //
// Copyright (C) 2008 Lasse Collin // Author: Lasse Collin
// //
// This library is free software; you can redistribute it and/or // This file has been put into the public domain.
// modify it under the terms of the GNU Lesser General Public // You can do whatever you want with this file.
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -3,17 +3,10 @@
/// \file filter_decoder.c /// \file filter_decoder.c
/// \brief Filter ID mapping to filter-specific functions /// \brief Filter ID mapping to filter-specific functions
// //
// Copyright (C) 2008 Lasse Collin // Author: Lasse Collin
// //
// This library is free software; you can redistribute it and/or // This file has been put into the public domain.
// modify it under the terms of the GNU Lesser General Public // You can do whatever you want with this file.
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -3,17 +3,10 @@
/// \file filter_decoder.c /// \file filter_decoder.c
/// \brief Filter ID mapping to filter-specific functions /// \brief Filter ID mapping to filter-specific functions
// //
// Copyright (C) 2008 Lasse Collin // Author: Lasse Collin
// //
// This library is free software; you can redistribute it and/or // This file has been put into the public domain.
// modify it under the terms of the GNU Lesser General Public // You can do whatever you want with this file.
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -3,17 +3,10 @@
/// \file filter_decoder.c /// \file filter_decoder.c
/// \brief Filter ID mapping to filter-specific functions /// \brief Filter ID mapping to filter-specific functions
// //
// Copyright (C) 2008 Lasse Collin // Author: Lasse Collin
// //
// This library is free software; you can redistribute it and/or // This file has been put into the public domain.
// modify it under the terms of the GNU Lesser General Public // You can do whatever you want with this file.
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -3,17 +3,10 @@
/// \file filter_encoder.c /// \file filter_encoder.c
/// \brief Filter ID mapping to filter-specific functions /// \brief Filter ID mapping to filter-specific functions
// //
// Copyright (C) 2008 Lasse Collin // Author: Lasse Collin
// //
// This library is free software; you can redistribute it and/or // This file has been put into the public domain.
// modify it under the terms of the GNU Lesser General Public // You can do whatever you want with this file.
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -3,17 +3,10 @@
/// \file filter_flags_decoder.c /// \file filter_flags_decoder.c
/// \brief Decodes a Filter Flags field /// \brief Decodes a Filter Flags field
// //
// Copyright (C) 2007 Lasse Collin // Author: Lasse Collin
// //
// This library is free software; you can redistribute it and/or // This file has been put into the public domain.
// modify it under the terms of the GNU Lesser General Public // You can do whatever you want with this file.
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -3,17 +3,10 @@
/// \file filter_flags_encoder.c /// \file filter_flags_encoder.c
/// \brief Decodes a Filter Flags field /// \brief Decodes a Filter Flags field
// //
// Copyright (C) 2007 Lasse Collin // Author: Lasse Collin
// //
// This library is free software; you can redistribute it and/or // This file has been put into the public domain.
// modify it under the terms of the GNU Lesser General Public // You can do whatever you want with this file.
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -3,17 +3,10 @@
/// \file index.c /// \file index.c
/// \brief Handling of Index /// \brief Handling of Index
// //
// Copyright (C) 2007 Lasse Collin // Author: Lasse Collin
// //
// This library is free software; you can redistribute it and/or // This file has been put into the public domain.
// modify it under the terms of the GNU Lesser General Public // You can do whatever you want with this file.
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -3,17 +3,10 @@
/// \file index.h /// \file index.h
/// \brief Handling of Index /// \brief Handling of Index
// //
// Copyright (C) 2008 Lasse Collin // Author: Lasse Collin
// //
// This library is free software; you can redistribute it and/or // This file has been put into the public domain.
// modify it under the terms of the GNU Lesser General Public // You can do whatever you want with this file.
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -3,17 +3,10 @@
/// \file index_decoder.c /// \file index_decoder.c
/// \brief Decodes the Index field /// \brief Decodes the Index field
// //
// Copyright (C) 2008 Lasse Collin // Author: Lasse Collin
// //
// This library is free software; you can redistribute it and/or // This file has been put into the public domain.
// modify it under the terms of the GNU Lesser General Public // You can do whatever you want with this file.
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -3,17 +3,10 @@
/// \file index_encoder.c /// \file index_encoder.c
/// \brief Encodes the Index field /// \brief Encodes the Index field
// //
// Copyright (C) 2008 Lasse Collin // Author: Lasse Collin
// //
// This library is free software; you can redistribute it and/or // This file has been put into the public domain.
// modify it under the terms of the GNU Lesser General Public // You can do whatever you want with this file.
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -3,17 +3,10 @@
/// \file index_encoder.h /// \file index_encoder.h
/// \brief Encodes the Index field /// \brief Encodes the Index field
// //
// Copyright (C) 2008 Lasse Collin // Author: Lasse Collin
// //
// This library is free software; you can redistribute it and/or // This file has been put into the public domain.
// modify it under the terms of the GNU Lesser General Public // You can do whatever you want with this file.
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -3,17 +3,10 @@
/// \file index_hash.c /// \file index_hash.c
/// \brief Validates Index by using a hash function /// \brief Validates Index by using a hash function
// //
// Copyright (C) 2008 Lasse Collin // Author: Lasse Collin
// //
// This library is free software; you can redistribute it and/or // This file has been put into the public domain.
// modify it under the terms of the GNU Lesser General Public // You can do whatever you want with this file.
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -3,17 +3,10 @@
/// \file stream_buffer_decoder.c /// \file stream_buffer_decoder.c
/// \brief Single-call .xz Stream decoder /// \brief Single-call .xz Stream decoder
// //
// Copyright (C) 2009 Lasse Collin // Author: Lasse Collin
// //
// This library is free software; you can redistribute it and/or // This file has been put into the public domain.
// modify it under the terms of the GNU Lesser General Public // You can do whatever you want with this file.
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -3,17 +3,10 @@
/// \file stream_buffer_encoder.c /// \file stream_buffer_encoder.c
/// \brief Single-call .xz Stream encoder /// \brief Single-call .xz Stream encoder
// //
// Copyright (C) 2009 Lasse Collin // Author: Lasse Collin
// //
// This library is free software; you can redistribute it and/or // This file has been put into the public domain.
// modify it under the terms of the GNU Lesser General Public // You can do whatever you want with this file.
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -3,17 +3,10 @@
/// \file stream_decoder.c /// \file stream_decoder.c
/// \brief Decodes .xz Streams /// \brief Decodes .xz Streams
// //
// Copyright (C) 2007 Lasse Collin // Author: Lasse Collin
// //
// This library is free software; you can redistribute it and/or // This file has been put into the public domain.
// modify it under the terms of the GNU Lesser General Public // You can do whatever you want with this file.
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -3,17 +3,10 @@
/// \file stream_decoder.h /// \file stream_decoder.h
/// \brief Decodes .xz Streams /// \brief Decodes .xz Streams
// //
// Copyright (C) 2008 Lasse Collin // Author: Lasse Collin
// //
// This library is free software; you can redistribute it and/or // This file has been put into the public domain.
// modify it under the terms of the GNU Lesser General Public // You can do whatever you want with this file.
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -3,17 +3,10 @@
/// \file stream_encoder.c /// \file stream_encoder.c
/// \brief Encodes .xz Streams /// \brief Encodes .xz Streams
// //
// Copyright (C) 2007-2008 Lasse Collin // Author: Lasse Collin
// //
// This library is free software; you can redistribute it and/or // This file has been put into the public domain.
// modify it under the terms of the GNU Lesser General Public // You can do whatever you want with this file.
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

Some files were not shown because too many files have changed in this diff Show More