diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 6c8eb9b..0000000 --- a/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/build -/nbproject diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 9aecb0f..0000000 --- a/.travis.yml +++ /dev/null @@ -1,122 +0,0 @@ -# Copyright 2017, alex at staticlibs.net -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -language: cpp - -sudo: required - -services: - - docker - -os: - - linux - - osx - -before_install: - - export CC= - - export CXX= - - export D="docker exec fedora" - - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then - docker pull fedora ; - docker run -id --name fedora -v `pwd`/..:/src -w=/root fedora bash ; - fi - -install: - - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then - - `# Ubuntu` ; - sudo apt-get -y install - g++ - pkg-config - cmake - make - valgrind - zlib1g-dev - liblzma-dev ; - - `# Fedora` ; - $D dnf install -y - gcc-c++ - pkg-config - cmake - make - valgrind - zlib-devel - xz-devel ; - - `# Android` ; - git clone https://github.com/staticlibs/android-ndk-r9d-arm-linux-androideabi-4.8.git ../android-ndk ; - - fi - -before_script: - - cd .. - - git clone https://github.com/staticlibs/cmake.git -# mac and android - - git clone https://github.com/staticlibs/external_zlib.git - - git clone https://github.com/staticlibs/lookaside_zlib.git - - git clone https://github.com/staticlibs/external_xz.git - - git clone https://github.com/staticlibs/lookaside_xz.git -# all platforms - - git clone https://github.com/staticlibs/staticlib_config.git - - git clone https://github.com/staticlibs/staticlib_support.git - - git clone https://github.com/staticlibs/staticlib_io.git - - git clone https://github.com/staticlibs/staticlib_endian.git -# test only - - rm -rf test - - mkdir test - - cp -r staticlib_compress/test/data test/ - - git clone https://github.com/staticlibs/staticlib_utils.git - - git clone https://github.com/staticlibs/staticlib_tinydir.git - - git clone https://github.com/staticlibs/tinydir.git - -script: - - mkdir build - - cd build - - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then - - `# macOS` ; - cmake ../staticlib_compress/test -DSTATICLIB_TOOLCHAIN=macosx_amd64_clang -DCMAKE_BUILD_TYPE=Release ; - make all test ; - - fi - - - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then - set -e ; - - `# Ubuntu` ; - lsb_release -a ; - cmake ../staticlib_compress/test -DCMAKE_BUILD_TYPE=Release ; - make all test ; - - `# Fedora` ; - $D cat /etc/fedora-release ; - $D cmake /src/staticlib_compress/test -DCMAKE_BUILD_TYPE=Release ; - $D mkdir /test ; - $D cp -r /src/staticlib_compress/test/data /test/ ; - $D make all test ; - - `# Android` ; - cd .. ; - mkdir build-android ; - cd build-android ; - cmake ../staticlib_compress/test -DCMAKE_BUILD_TYPE=Release -DSTATICLIB_TOOLCHAIN=android_armeabi_gcc -DANDROID_TOOLCHAIN_DIR=`pwd`/../android-ndk ; - make ; - - fi - -notifications: - email: - on_success: always diff --git a/CMakeLists.txt b/CMakeLists.txt deleted file mode 100644 index 92ab3d6..0000000 --- a/CMakeLists.txt +++ /dev/null @@ -1,61 +0,0 @@ -# Copyright 2016, alex at staticlibs.net -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -cmake_minimum_required ( VERSION 2.8.12 ) - -project ( staticlib_compress CXX ) -set ( ${PROJECT_NAME}_STATICLIB_VERSION 1.2.2 ) -set ( ${PROJECT_NAME}_DESCRIPTION "Staticlibs Compress library" ) -set ( ${PROJECT_NAME}_URL https://github.com/staticlibs/staticlib_compress ) -include ( ${CMAKE_CURRENT_LIST_DIR}/resources/macros.cmake ) - -option ( ${PROJECT_NAME}_ENABLE_XZ "Enable support for XZ" OFF ) - -# docs -option ( ${PROJECT_NAME}_ENABLE_DOCS "Generate doxyfile and exit build" OFF ) -if ( ${PROJECT_NAME}_ENABLE_DOCS ) - configure_file ( ${CMAKE_CURRENT_LIST_DIR}/resources/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile ) - return ( ) -endif ( ) - -# standalone build -if ( NOT DEFINED CMAKE_LIBRARY_OUTPUT_DIRECTORY ) - set ( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR} ) -endif ( ) -if ( NOT DEFINED STATICLIB_TOOLCHAIN ) - if ( NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" ) - staticlib_compress_add_subdirectory ( ${CMAKE_CURRENT_LIST_DIR}/../external_zlib ) - if ( ${PROJECT_NAME}_ENABLE_XZ ) - staticlib_compress_add_subdirectory ( ${CMAKE_CURRENT_LIST_DIR}/../external_xz ) - endif ( ) - endif ( ) - staticlib_compress_add_subdirectory ( ${CMAKE_CURRENT_LIST_DIR}/../staticlib_config ) - staticlib_compress_add_subdirectory ( ${CMAKE_CURRENT_LIST_DIR}/../staticlib_support ) - staticlib_compress_add_subdirectory ( ${CMAKE_CURRENT_LIST_DIR}/../staticlib_io ) - staticlib_compress_add_subdirectory ( ${CMAKE_CURRENT_LIST_DIR}/../staticlib_endian ) -endif ( ) - -# target -file ( GLOB_RECURSE ${PROJECT_NAME}_HEADERS ${CMAKE_CURRENT_LIST_DIR}/include/*.hpp ) -source_group ( "include" FILES ${${PROJECT_NAME}_HEADERS} ) -add_custom_target ( ${PROJECT_NAME} SOURCES ${${PROJECT_NAME}_HEADERS} ) - -# pkg-config -set ( ${PROJECT_NAME}_PC_REQUIRES "zlib" ) -set ( ${PROJECT_NAME}_PC_CFLAGS "-I${CMAKE_CURRENT_LIST_DIR}/include -DZLIB_CONST" ) -if ( ${PROJECT_NAME}_ENABLE_XZ ) - set ( ${PROJECT_NAME}_PC_CFLAGS "${${PROJECT_NAME}_PC_CFLAGS} -DSTATCILIB_COMPRESS_ENABLE_XZ" ) -endif ( ) -configure_file ( ${CMAKE_CURRENT_LIST_DIR}/resources/pkg-config.in - ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/pkgconfig/${PROJECT_NAME}.pc ) diff --git a/LICENSE.txt b/LICENSE.txt deleted file mode 100644 index 60f28e7..0000000 --- a/LICENSE.txt +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2016, alex@staticlibs.net - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/README.md b/README.md deleted file mode 100644 index e69aefc..0000000 --- a/README.md +++ /dev/null @@ -1,52 +0,0 @@ -Staticlibs Compress library -=========================== - -[![travis](https://travis-ci.org/staticlibs/staticlib_compress.svg?branch=master)](https://travis-ci.org/staticlibs/staticlib_compress) -[![appveyor](https://ci.appveyor.com/api/projects/status/github/staticlibs/staticlib_compress?svg=true)](https://ci.appveyor.com/project/staticlibs/staticlib-compress) - -This project is a part of [Staticlibs](http://staticlibs.net/). - -This project provides implementation of `Source` (input stream) and `Sink` (output stream) -that performs compression/decompress using [Zlib](http://www.zlib.net/) and [Xz](http://tukaani.org/xz/) -compression algorithms. - -It additionally provides `zip_sink` that allows to write ZIP files. [staticlib_unzip](https://github.com/staticlibs/staticlib_unzip) library can be used to read ZIP files. - -This library is header-only and depends on [staticlib_io](https://github.com/staticlibs/staticlib_io.git), -[staticlib_config](https://github.com/staticlibs/staticlib_config.git), -Zlib and Xz Utils (liblzma). - -Link to the [API documentation](http://staticlibs.github.io/staticlib_compress/docs/html/namespacestaticlib_1_1compress.html). - -License information -------------------- - -This project is released under the [Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0). - -Changelog ---------- - -**2018-05-16** - - * version 1.2.2 - * drop broken move constructor in `zip_sink` - -**2018-02-22** - - * version 1.2.1 - * check data avail before writing - -**2017-12-24** - - * version 1.2.0 - * `zip_sink` implementation - * vs2017 support - -**2017-05-29** - - * version 1.1.0 - * update interfaces to use spans - -**2016-02-06** - - * version 1.0 diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 6c4b25d..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,63 +0,0 @@ -# Copyright 2017, alex at staticlibs.net -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -environment: - matrix: - - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013 - SL_CMAKE_VS: 12 2013 - - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - SL_CMAKE_VS: 15 2017 - -clone_folder: c:\projects\staticlib_compress - -install: - - cd .. - - git clone https://github.com/staticlibs/tools_windows_pkgconfig.git - - set PATH=%PATH%;c:\projects\tools_windows_pkgconfig\bin - - git clone https://github.com/staticlibs/cmake.git - - git clone https://github.com/staticlibs/external_zlib.git - - git clone https://github.com/staticlibs/lookaside_zlib.git - - git clone https://github.com/staticlibs/external_xz.git - - git clone https://github.com/staticlibs/lookaside_xz.git - - git clone https://github.com/staticlibs/staticlib_config.git - - git clone https://github.com/staticlibs/staticlib_support.git - - git clone https://github.com/staticlibs/staticlib_io.git - - git clone https://github.com/staticlibs/staticlib_endian.git -# test only - - mkdir test - - robocopy staticlib_compress\test\data test\data /e /ndl /njh /njs /nc /ns /np || true - - git clone https://github.com/staticlibs/staticlib_utils.git - - git clone https://github.com/staticlibs/staticlib_tinydir.git - - git clone https://github.com/staticlibs/tinydir.git - -build: off - -build_script: - - mkdir build_i386 - - cd build_i386 - - cmake ../staticlib_compress/test - -G "Visual Studio %SL_CMAKE_VS%" - -DSTATICLIB_TOOLCHAIN=windows_i386_msvc - -DCMAKE_BUILD_TYPE=Release - - cmake --build . --config Release - - ctest - - cd .. - - mkdir build_amd64 - - cd build_amd64 - - cmake ../staticlib_compress/test - -G "Visual Studio %SL_CMAKE_VS% Win64" - -DSTATICLIB_TOOLCHAIN=windows_amd64_msvc - -DCMAKE_BUILD_TYPE=Release - - cmake --build . --config Release - - ctest diff --git a/docs/html/annotated.html b/docs/html/annotated.html new file mode 100644 index 0000000..7246ffc --- /dev/null +++ b/docs/html/annotated.html @@ -0,0 +1,111 @@ + + + + + +staticlib_compress: Class List + + + + + + + + + +
+
+ + + + + + + +
+
staticlib_compress +  1.2.0 +
+
+
+ + + + + +
+ +
+ All Classes Namespaces Files Functions Enumerations
+ + +
+ +
+ +
+
+
Class List
+
+
+
Here are the classes, structs, unions and interfaces with brief descriptions:
+
[detail level 1234]
+ + + + + + + + + + +
\Nstaticlib
 \Ncompress
  oNdetail
  |\CHeaderHttps://en.wikipedia.org/wiki/Zip_%28file_format%29
  oCcompress_exceptionException that is thrown on compression/decompression error
  oCdeflate_sinkSink wrapper that compressed written data using Deflate algorithm
  oCinflate_sourceSource wrapper that decompresses deflated data
  oClzma_sinkSink wrapper that compressed written data using LZMA algorithm
  oClzma_sourceSource wrapper that decompresses deflated data
  \Czip_sinkSink wrapper that creates ZIP archives, CRC sum and compression of entries is NOT supported
+
+
+ + + + diff --git a/docs/html/bc_s.png b/docs/html/bc_s.png new file mode 100644 index 0000000..25e3beb Binary files /dev/null and b/docs/html/bc_s.png differ diff --git a/docs/html/bdwn.png b/docs/html/bdwn.png new file mode 100644 index 0000000..940a0b9 Binary files /dev/null and b/docs/html/bdwn.png differ diff --git a/docs/html/classes.html b/docs/html/classes.html new file mode 100644 index 0000000..641038c --- /dev/null +++ b/docs/html/classes.html @@ -0,0 +1,114 @@ + + + + + +staticlib_compress: Class Index + + + + + + + + + +
+
+ + + + + + + +
+
staticlib_compress +  1.2.0 +
+
+
+ + + + + +
+ +
+ All Classes Namespaces Files Functions Enumerations
+ + +
+ +
+ +
+
+
Class Index
+
+
+
C | D | H | I | L | Z
+ + + + + + + + +
  C  
+
  H  
+
  L  
+
  Z  
+
compress_exception (staticlib::compress)   Header (staticlib::compress::detail)   lzma_sink (staticlib::compress)   zip_sink (staticlib::compress)   
  D  
+
  I  
+
lzma_source (staticlib::compress)   
deflate_sink (staticlib::compress)   inflate_source (staticlib::compress)   
+
C | D | H | I | L | Z
+
+ + + + diff --git a/docs/html/classstaticlib_1_1compress_1_1compress__exception-members.html b/docs/html/classstaticlib_1_1compress_1_1compress__exception-members.html new file mode 100644 index 0000000..f614e1d --- /dev/null +++ b/docs/html/classstaticlib_1_1compress_1_1compress__exception-members.html @@ -0,0 +1,106 @@ + + + + + +staticlib_compress: Member List + + + + + + + + + +
+
+ + + + + + + +
+
staticlib_compress +  1.2.0 +
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Enumerations
+ + +
+ +
+ + +
+
+
+
staticlib::compress::compress_exception Member List
+
+
+ +

This is the complete list of members for staticlib::compress::compress_exception, including all inherited members.

+ + + +
compress_exception()staticlib::compress::compress_exception
compress_exception(const std::string &msg)staticlib::compress::compress_exceptioninline
+ + + + diff --git a/docs/html/classstaticlib_1_1compress_1_1compress__exception.html b/docs/html/classstaticlib_1_1compress_1_1compress__exception.html new file mode 100644 index 0000000..d92656f --- /dev/null +++ b/docs/html/classstaticlib_1_1compress_1_1compress__exception.html @@ -0,0 +1,172 @@ + + + + + +staticlib_compress: staticlib::compress::compress_exception Class Reference + + + + + + + + + +
+
+ + + + + + + +
+
staticlib_compress +  1.2.0 +
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Enumerations
+ + +
+ +
+ + +
+
+
+Public Member Functions | +List of all members
+
+
staticlib::compress::compress_exception Class Reference
+
+
+ +

Exception that is thrown on compression/decompression error. + More...

+ +

#include <staticlib/compress/compress_exception.hpp>

+ + + + + + +

+Public Member Functions

 compress_exception ()
 Default constructor.
 compress_exception (const std::string &msg)
 Constructor with message.
+

Detailed Description

+

Exception that is thrown on compression/decompression error.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
staticlib::compress::compress_exception::compress_exception ()
+
+ +

Default constructor.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
staticlib::compress::compress_exception::compress_exception (const std::string & msg)
+
+inline
+
+ +

Constructor with message.

+
Parameters
+ + +
msgerror message
+
+
+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + diff --git a/docs/html/classstaticlib_1_1compress_1_1deflate__sink-members.html b/docs/html/classstaticlib_1_1compress_1_1deflate__sink-members.html new file mode 100644 index 0000000..c4aa23f --- /dev/null +++ b/docs/html/classstaticlib_1_1compress_1_1deflate__sink-members.html @@ -0,0 +1,111 @@ + + + + + +staticlib_compress: Member List + + + + + + + + + +
+
+ + + + + + + +
+
staticlib_compress +  1.2.0 +
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Enumerations
+ + +
+ +
+ + +
+
+
+
staticlib::compress::deflate_sink< Sink, compression_level, buf_size > Member List
+
+
+ +

This is the complete list of members for staticlib::compress::deflate_sink< Sink, compression_level, buf_size >, including all inherited members.

+ + + + + + + + +
deflate_sink(Sink &&sink)staticlib::compress::deflate_sink< Sink, compression_level, buf_size >inline
deflate_sink(deflate_sink &&other)staticlib::compress::deflate_sink< Sink, compression_level, buf_size >inline
flush()staticlib::compress::deflate_sink< Sink, compression_level, buf_size >inline
get_sink()staticlib::compress::deflate_sink< Sink, compression_level, buf_size >inline
operator=(const deflate_sink &)staticlib::compress::deflate_sink< Sink, compression_level, buf_size >
operator=(deflate_sink &&other)staticlib::compress::deflate_sink< Sink, compression_level, buf_size >inline
write(sl::io::span< const char > span)staticlib::compress::deflate_sink< Sink, compression_level, buf_size >inline
+ + + + diff --git a/docs/html/classstaticlib_1_1compress_1_1deflate__sink.html b/docs/html/classstaticlib_1_1compress_1_1deflate__sink.html new file mode 100644 index 0000000..5099951 --- /dev/null +++ b/docs/html/classstaticlib_1_1compress_1_1deflate__sink.html @@ -0,0 +1,358 @@ + + + + + +staticlib_compress: staticlib::compress::deflate_sink< Sink, compression_level, buf_size > Class Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
staticlib_compress +  1.2.0 +
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Enumerations
+ + +
+ +
+ + +
+
+
+Public Member Functions | +List of all members
+
+
staticlib::compress::deflate_sink< Sink, compression_level, buf_size > Class Template Reference
+
+
+ +

Sink wrapper that compressed written data using Deflate algorithm. + More...

+ +

#include <staticlib/compress/deflate_sink.hpp>

+ + + + + + + + + + + + + + + + +

+Public Member Functions

 deflate_sink (Sink &&sink)
 Constructor.
deflate_sink & operator= (const deflate_sink &)
 Deleted copy assignment operator.
 deflate_sink (deflate_sink &&other)
 Move constructor.
deflate_sink & operator= (deflate_sink &&other)
 Move assignment operator.
std::streamsize write (sl::io::span< const char > span)
 Write implementation.
std::streamsize flush ()
 Calls flush on dest stream.
Sink & get_sink ()
 Underlying sink accessor.
+

Detailed Description

+

template<typename Sink, int compression_level = 6, std::size_t buf_size = 4096>
+class staticlib::compress::deflate_sink< Sink, compression_level, buf_size >

+ +

Sink wrapper that compressed written data using Deflate algorithm.

+

Constructor & Destructor Documentation

+ +
+
+
+template<typename Sink , int compression_level = 6, std::size_t buf_size = 4096>
+ + + + + +
+ + + + + + + + +
staticlib::compress::deflate_sink< Sink, compression_level, buf_size >::deflate_sink (Sink && sink)
+
+inline
+
+ +

Constructor.

+
Parameters
+ + +
sinkdestination to write compressed data into
+
+
+ +
+
+ +
+
+
+template<typename Sink , int compression_level = 6, std::size_t buf_size = 4096>
+ + + + + +
+ + + + + + + + +
staticlib::compress::deflate_sink< Sink, compression_level, buf_size >::deflate_sink (deflate_sink< Sink, compression_level, buf_size > && other)
+
+inline
+
+ +

Move constructor.

+
Parameters
+ + +
otherother instance
+
+
+ +
+
+

Member Function Documentation

+ +
+
+
+template<typename Sink , int compression_level = 6, std::size_t buf_size = 4096>
+ + + + + +
+ + + + + + + +
std::streamsize staticlib::compress::deflate_sink< Sink, compression_level, buf_size >::flush ()
+
+inline
+
+ +

Calls flush on dest stream.

+
Returns
value returned by dest stream
+ +
+
+ +
+
+
+template<typename Sink , int compression_level = 6, std::size_t buf_size = 4096>
+ + + + + +
+ + + + + + + +
Sink& staticlib::compress::deflate_sink< Sink, compression_level, buf_size >::get_sink ()
+
+inline
+
+ +

Underlying sink accessor.

+
Returns
underlying sink reference
+ +
+
+ +
+
+
+template<typename Sink , int compression_level = 6, std::size_t buf_size = 4096>
+ + + + + + + + +
deflate_sink& staticlib::compress::deflate_sink< Sink, compression_level, buf_size >::operator= (const deflate_sink< Sink, compression_level, buf_size > & )
+
+ +

Deleted copy assignment operator.

+
Parameters
+ + +
otherinstance
+
+
+
Returns
this instance
+ +
+
+ +
+
+
+template<typename Sink , int compression_level = 6, std::size_t buf_size = 4096>
+ + + + + +
+ + + + + + + + +
deflate_sink& staticlib::compress::deflate_sink< Sink, compression_level, buf_size >::operator= (deflate_sink< Sink, compression_level, buf_size > && other)
+
+inline
+
+ +

Move assignment operator.

+
Parameters
+ + +
otherother instance
+
+
+
Returns
this instance
+ +
+
+ +
+
+
+template<typename Sink , int compression_level = 6, std::size_t buf_size = 4096>
+ + + + + +
+ + + + + + + + +
std::streamsize staticlib::compress::deflate_sink< Sink, compression_level, buf_size >::write (sl::io::span< const char > span)
+
+inline
+
+ +

Write implementation.

+
Parameters
+ + +
spansource span
+
+
+
Returns
number of bytes processed (read from source span)
+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + diff --git a/docs/html/classstaticlib_1_1compress_1_1detail_1_1Header-members.html b/docs/html/classstaticlib_1_1compress_1_1detail_1_1Header-members.html new file mode 100644 index 0000000..bee499a --- /dev/null +++ b/docs/html/classstaticlib_1_1compress_1_1detail_1_1Header-members.html @@ -0,0 +1,108 @@ + + + + + +staticlib_compress: Member List + + + + + + + + + +
+
+ + + + + + + +
+
staticlib_compress +  1.2.0 +
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Enumerations
+ + +
+ +
+ + +
+
+
+
staticlib::compress::detail::Header Member List
+
+
+ +

This is the complete list of members for staticlib::compress::detail::Header, including all inherited members.

+ + + + + +
Header(std::string filename, uint16_t compression_method)staticlib::compress::detail::Headerinline
write_cd_file_header(Sink &sink)staticlib::compress::detail::Headerinline
write_data_descriptor(Sink &sink, uint32_t compressed_size, uint32_t uncompressed_size, uint32_t crc)staticlib::compress::detail::Headerinline
write_local_file_header(Sink &sink, uint32_t offset)staticlib::compress::detail::Headerinline
+ + + + diff --git a/docs/html/classstaticlib_1_1compress_1_1detail_1_1Header.html b/docs/html/classstaticlib_1_1compress_1_1detail_1_1Header.html new file mode 100644 index 0000000..b5349b7 --- /dev/null +++ b/docs/html/classstaticlib_1_1compress_1_1detail_1_1Header.html @@ -0,0 +1,271 @@ + + + + + +staticlib_compress: staticlib::compress::detail::Header Class Reference + + + + + + + + + +
+
+ + + + + + + +
+
staticlib_compress +  1.2.0 +
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Enumerations
+ + +
+ +
+ + +
+
+
+Public Member Functions | +List of all members
+
+
staticlib::compress::detail::Header Class Reference
+
+
+ +

https://en.wikipedia.org/wiki/Zip_%28file_format%29 + More...

+ +

#include <staticlib/compress/zip_sink.hpp>

+ + + + + + + + + +

+Public Member Functions

 Header (std::string filename, uint16_t compression_method)
template<typename Sink >
void write_local_file_header (Sink &sink, uint32_t offset)
template<typename Sink >
void write_data_descriptor (Sink &sink, uint32_t compressed_size, uint32_t uncompressed_size, uint32_t crc)
template<typename Sink >
void write_cd_file_header (Sink &sink)
+

Detailed Description

+

https://en.wikipedia.org/wiki/Zip_%28file_format%29

+

Constructor & Destructor Documentation

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
staticlib::compress::detail::Header::Header (std::string filename,
uint16_t compression_method 
)
+
+inline
+
+ +
+
+

Member Function Documentation

+ +
+
+
+template<typename Sink >
+ + + + + +
+ + + + + + + + +
void staticlib::compress::detail::Header::write_cd_file_header (Sink & sink)
+
+inline
+
+ +
+
+ +
+
+
+template<typename Sink >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void staticlib::compress::detail::Header::write_data_descriptor (Sink & sink,
uint32_t compressed_size,
uint32_t uncompressed_size,
uint32_t crc 
)
+
+inline
+
+ +
+
+ +
+
+
+template<typename Sink >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void staticlib::compress::detail::Header::write_local_file_header (Sink & sink,
uint32_t offset 
)
+
+inline
+
+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + diff --git a/docs/html/classstaticlib_1_1compress_1_1inflate__source-members.html b/docs/html/classstaticlib_1_1compress_1_1inflate__source-members.html new file mode 100644 index 0000000..dbb3e52 --- /dev/null +++ b/docs/html/classstaticlib_1_1compress_1_1inflate__source-members.html @@ -0,0 +1,110 @@ + + + + + +staticlib_compress: Member List + + + + + + + + + +
+
+ + + + + + + +
+
staticlib_compress +  1.2.0 +
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Enumerations
+ + +
+ +
+ + +
+
+
+
staticlib::compress::inflate_source< Source, buf_size > Member List
+
+
+ +

This is the complete list of members for staticlib::compress::inflate_source< Source, buf_size >, including all inherited members.

+ + + + + + + +
get_source()staticlib::compress::inflate_source< Source, buf_size >inline
inflate_source(Source src)staticlib::compress::inflate_source< Source, buf_size >inline
inflate_source(inflate_source &&other)staticlib::compress::inflate_source< Source, buf_size >inline
operator=(const inflate_source &)staticlib::compress::inflate_source< Source, buf_size >
operator=(inflate_source &&other)staticlib::compress::inflate_source< Source, buf_size >inline
read(sl::io::span< char > span)staticlib::compress::inflate_source< Source, buf_size >inline
+ + + + diff --git a/docs/html/classstaticlib_1_1compress_1_1inflate__source.html b/docs/html/classstaticlib_1_1compress_1_1inflate__source.html new file mode 100644 index 0000000..50ca58d --- /dev/null +++ b/docs/html/classstaticlib_1_1compress_1_1inflate__source.html @@ -0,0 +1,328 @@ + + + + + +staticlib_compress: staticlib::compress::inflate_source< Source, buf_size > Class Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
staticlib_compress +  1.2.0 +
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Enumerations
+ + +
+ +
+ + +
+
+
+Public Member Functions | +List of all members
+
+
staticlib::compress::inflate_source< Source, buf_size > Class Template Reference
+
+
+ +

Source wrapper that decompresses deflated data. + More...

+ +

#include <staticlib/compress/inflate_source.hpp>

+ + + + + + + + + + + + + + +

+Public Member Functions

 inflate_source (Source src)
 Constructor, created object will own the specified source.
inflate_source & operator= (const inflate_source &)
 Deleted copy assignment operator.
 inflate_source (inflate_source &&other)
 Move constructor.
inflate_source & operator= (inflate_source &&other)
 Move assignment operator.
std::streamsize read (sl::io::span< char > span)
 Read implementation.
Source & get_source ()
 Underlying source accessor.
+

Detailed Description

+

template<typename Source, std::size_t buf_size = 4096>
+class staticlib::compress::inflate_source< Source, buf_size >

+ +

Source wrapper that decompresses deflated data.

+

Constructor & Destructor Documentation

+ +
+
+
+template<typename Source , std::size_t buf_size = 4096>
+ + + + + +
+ + + + + + + + +
staticlib::compress::inflate_source< Source, buf_size >::inflate_source (Source src)
+
+inline
+
+ +

Constructor, created object will own the specified source.

+
Parameters
+ + +
srcsource to read compressed data from
+
+
+ +
+
+ +
+
+
+template<typename Source , std::size_t buf_size = 4096>
+ + + + + +
+ + + + + + + + +
staticlib::compress::inflate_source< Source, buf_size >::inflate_source (inflate_source< Source, buf_size > && other)
+
+inline
+
+ +

Move constructor.

+
Parameters
+ + +
otherother instance
+
+
+ +
+
+

Member Function Documentation

+ +
+
+
+template<typename Source , std::size_t buf_size = 4096>
+ + + + + +
+ + + + + + + +
Source& staticlib::compress::inflate_source< Source, buf_size >::get_source ()
+
+inline
+
+ +

Underlying source accessor.

+
Returns
underlying source reference
+ +
+
+ +
+
+
+template<typename Source , std::size_t buf_size = 4096>
+ + + + + + + + +
inflate_source& staticlib::compress::inflate_source< Source, buf_size >::operator= (const inflate_source< Source, buf_size > & )
+
+ +

Deleted copy assignment operator.

+
Parameters
+ + +
otherinstance
+
+
+
Returns
this instance
+ +
+
+ +
+
+
+template<typename Source , std::size_t buf_size = 4096>
+ + + + + +
+ + + + + + + + +
inflate_source& staticlib::compress::inflate_source< Source, buf_size >::operator= (inflate_source< Source, buf_size > && other)
+
+inline
+
+ +

Move assignment operator.

+
Parameters
+ + +
otherother instance
+
+
+
Returns
this instance
+ +
+
+ +
+
+
+template<typename Source , std::size_t buf_size = 4096>
+ + + + + +
+ + + + + + + + +
std::streamsize staticlib::compress::inflate_source< Source, buf_size >::read (sl::io::span< char > span)
+
+inline
+
+ +

Read implementation.

+
Parameters
+ + +
spanoutput span
+
+
+
Returns
number of bytes written into specified span
+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + diff --git a/docs/html/classstaticlib_1_1compress_1_1lzma__sink-members.html b/docs/html/classstaticlib_1_1compress_1_1lzma__sink-members.html new file mode 100644 index 0000000..817c6df --- /dev/null +++ b/docs/html/classstaticlib_1_1compress_1_1lzma__sink-members.html @@ -0,0 +1,111 @@ + + + + + +staticlib_compress: Member List + + + + + + + + + +
+
+ + + + + + + +
+
staticlib_compress +  1.2.0 +
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Enumerations
+ + +
+ +
+ + +
+
+
+
staticlib::compress::lzma_sink< Sink, compression_level, buf_size > Member List
+
+
+ +

This is the complete list of members for staticlib::compress::lzma_sink< Sink, compression_level, buf_size >, including all inherited members.

+ + + + + + + + +
flush()staticlib::compress::lzma_sink< Sink, compression_level, buf_size >inline
get_sink()staticlib::compress::lzma_sink< Sink, compression_level, buf_size >inline
lzma_sink(Sink &&sink)staticlib::compress::lzma_sink< Sink, compression_level, buf_size >inline
lzma_sink(lzma_sink &&other)staticlib::compress::lzma_sink< Sink, compression_level, buf_size >inline
operator=(const lzma_sink &)staticlib::compress::lzma_sink< Sink, compression_level, buf_size >
operator=(lzma_sink &&other)staticlib::compress::lzma_sink< Sink, compression_level, buf_size >inline
write(sl::io::span< const char > span)staticlib::compress::lzma_sink< Sink, compression_level, buf_size >inline
+ + + + diff --git a/docs/html/classstaticlib_1_1compress_1_1lzma__sink.html b/docs/html/classstaticlib_1_1compress_1_1lzma__sink.html new file mode 100644 index 0000000..7bee72f --- /dev/null +++ b/docs/html/classstaticlib_1_1compress_1_1lzma__sink.html @@ -0,0 +1,358 @@ + + + + + +staticlib_compress: staticlib::compress::lzma_sink< Sink, compression_level, buf_size > Class Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
staticlib_compress +  1.2.0 +
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Enumerations
+ + +
+ +
+ + +
+
+
+Public Member Functions | +List of all members
+
+
staticlib::compress::lzma_sink< Sink, compression_level, buf_size > Class Template Reference
+
+
+ +

Sink wrapper that compressed written data using LZMA algorithm. + More...

+ +

#include <staticlib/compress/lzma_sink.hpp>

+ + + + + + + + + + + + + + + + +

+Public Member Functions

 lzma_sink (Sink &&sink)
 Constructor.
lzma_sink & operator= (const lzma_sink &)
 Deleted copy assignment operator.
 lzma_sink (lzma_sink &&other)
 Move constructor.
lzma_sink & operator= (lzma_sink &&other)
 Move assignment operator.
std::streamsize write (sl::io::span< const char > span)
 Write implementation.
std::streamsize flush ()
 Calls flush on dest stream.
Sink & get_sink ()
 Underlying sink accessor.
+

Detailed Description

+

template<typename Sink, int compression_level = 6, std::size_t buf_size = 4096>
+class staticlib::compress::lzma_sink< Sink, compression_level, buf_size >

+ +

Sink wrapper that compressed written data using LZMA algorithm.

+

Constructor & Destructor Documentation

+ +
+
+
+template<typename Sink , int compression_level = 6, std::size_t buf_size = 4096>
+ + + + + +
+ + + + + + + + +
staticlib::compress::lzma_sink< Sink, compression_level, buf_size >::lzma_sink (Sink && sink)
+
+inline
+
+ +

Constructor.

+
Parameters
+ + +
sinkdestination to write compressed data into
+
+
+ +
+
+ +
+
+
+template<typename Sink , int compression_level = 6, std::size_t buf_size = 4096>
+ + + + + +
+ + + + + + + + +
staticlib::compress::lzma_sink< Sink, compression_level, buf_size >::lzma_sink (lzma_sink< Sink, compression_level, buf_size > && other)
+
+inline
+
+ +

Move constructor.

+
Parameters
+ + +
otherother instance
+
+
+ +
+
+

Member Function Documentation

+ +
+
+
+template<typename Sink , int compression_level = 6, std::size_t buf_size = 4096>
+ + + + + +
+ + + + + + + +
std::streamsize staticlib::compress::lzma_sink< Sink, compression_level, buf_size >::flush ()
+
+inline
+
+ +

Calls flush on dest stream.

+
Returns
value returned by dest stream
+ +
+
+ +
+
+
+template<typename Sink , int compression_level = 6, std::size_t buf_size = 4096>
+ + + + + +
+ + + + + + + +
Sink& staticlib::compress::lzma_sink< Sink, compression_level, buf_size >::get_sink ()
+
+inline
+
+ +

Underlying sink accessor.

+
Returns
underlying sink reference
+ +
+
+ +
+
+
+template<typename Sink , int compression_level = 6, std::size_t buf_size = 4096>
+ + + + + + + + +
lzma_sink& staticlib::compress::lzma_sink< Sink, compression_level, buf_size >::operator= (const lzma_sink< Sink, compression_level, buf_size > & )
+
+ +

Deleted copy assignment operator.

+
Parameters
+ + +
otherinstance
+
+
+
Returns
this instance
+ +
+
+ +
+
+
+template<typename Sink , int compression_level = 6, std::size_t buf_size = 4096>
+ + + + + +
+ + + + + + + + +
lzma_sink& staticlib::compress::lzma_sink< Sink, compression_level, buf_size >::operator= (lzma_sink< Sink, compression_level, buf_size > && other)
+
+inline
+
+ +

Move assignment operator.

+
Parameters
+ + +
otherother instance
+
+
+
Returns
this instance
+ +
+
+ +
+
+
+template<typename Sink , int compression_level = 6, std::size_t buf_size = 4096>
+ + + + + +
+ + + + + + + + +
std::streamsize staticlib::compress::lzma_sink< Sink, compression_level, buf_size >::write (sl::io::span< const char > span)
+
+inline
+
+ +

Write implementation.

+
Parameters
+ + +
spansource span
+
+
+
Returns
number of bytes processed (read from source span)
+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + diff --git a/docs/html/classstaticlib_1_1compress_1_1lzma__source-members.html b/docs/html/classstaticlib_1_1compress_1_1lzma__source-members.html new file mode 100644 index 0000000..4b7e2dd --- /dev/null +++ b/docs/html/classstaticlib_1_1compress_1_1lzma__source-members.html @@ -0,0 +1,110 @@ + + + + + +staticlib_compress: Member List + + + + + + + + + +
+
+ + + + + + + +
+
staticlib_compress +  1.2.0 +
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Enumerations
+ + +
+ +
+ + +
+
+
+
staticlib::compress::lzma_source< Source, buf_size > Member List
+
+
+ +

This is the complete list of members for staticlib::compress::lzma_source< Source, buf_size >, including all inherited members.

+ + + + + + + +
get_source()staticlib::compress::lzma_source< Source, buf_size >inline
lzma_source(Source src)staticlib::compress::lzma_source< Source, buf_size >inline
lzma_source(lzma_source &&other)staticlib::compress::lzma_source< Source, buf_size >inline
operator=(const lzma_source &)staticlib::compress::lzma_source< Source, buf_size >
operator=(lzma_source &&other)staticlib::compress::lzma_source< Source, buf_size >inline
read(sl::io::span< char > span)staticlib::compress::lzma_source< Source, buf_size >inline
+ + + + diff --git a/docs/html/classstaticlib_1_1compress_1_1lzma__source.html b/docs/html/classstaticlib_1_1compress_1_1lzma__source.html new file mode 100644 index 0000000..0fd12a8 --- /dev/null +++ b/docs/html/classstaticlib_1_1compress_1_1lzma__source.html @@ -0,0 +1,328 @@ + + + + + +staticlib_compress: staticlib::compress::lzma_source< Source, buf_size > Class Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
staticlib_compress +  1.2.0 +
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Enumerations
+ + +
+ +
+ + +
+
+
+Public Member Functions | +List of all members
+
+
staticlib::compress::lzma_source< Source, buf_size > Class Template Reference
+
+
+ +

Source wrapper that decompresses deflated data. + More...

+ +

#include <staticlib/compress/lzma_source.hpp>

+ + + + + + + + + + + + + + +

+Public Member Functions

 lzma_source (Source src)
 Constructor, created object will own the specified source.
lzma_source & operator= (const lzma_source &)
 Deleted copy assignment operator.
 lzma_source (lzma_source &&other)
 Move constructor.
lzma_source & operator= (lzma_source &&other)
 Move assignment operator.
std::streamsize read (sl::io::span< char > span)
 Read implementation.
Source & get_source ()
 Underlying source accessor.
+

Detailed Description

+

template<typename Source, std::size_t buf_size = 4096>
+class staticlib::compress::lzma_source< Source, buf_size >

+ +

Source wrapper that decompresses deflated data.

+

Constructor & Destructor Documentation

+ +
+
+
+template<typename Source , std::size_t buf_size = 4096>
+ + + + + +
+ + + + + + + + +
staticlib::compress::lzma_source< Source, buf_size >::lzma_source (Source src)
+
+inline
+
+ +

Constructor, created object will own the specified source.

+
Parameters
+ + +
srcsource to read compressed data from
+
+
+ +
+
+ +
+
+
+template<typename Source , std::size_t buf_size = 4096>
+ + + + + +
+ + + + + + + + +
staticlib::compress::lzma_source< Source, buf_size >::lzma_source (lzma_source< Source, buf_size > && other)
+
+inline
+
+ +

Move constructor.

+
Parameters
+ + +
otherother instance
+
+
+ +
+
+

Member Function Documentation

+ +
+
+
+template<typename Source , std::size_t buf_size = 4096>
+ + + + + +
+ + + + + + + +
Source& staticlib::compress::lzma_source< Source, buf_size >::get_source ()
+
+inline
+
+ +

Underlying source accessor.

+
Returns
underlying source reference
+ +
+
+ +
+
+
+template<typename Source , std::size_t buf_size = 4096>
+ + + + + + + + +
lzma_source& staticlib::compress::lzma_source< Source, buf_size >::operator= (const lzma_source< Source, buf_size > & )
+
+ +

Deleted copy assignment operator.

+
Parameters
+ + +
otherinstance
+
+
+
Returns
this instance
+ +
+
+ +
+
+
+template<typename Source , std::size_t buf_size = 4096>
+ + + + + +
+ + + + + + + + +
lzma_source& staticlib::compress::lzma_source< Source, buf_size >::operator= (lzma_source< Source, buf_size > && other)
+
+inline
+
+ +

Move assignment operator.

+
Parameters
+ + +
otherother instance
+
+
+
Returns
this instance
+ +
+
+ +
+
+
+template<typename Source , std::size_t buf_size = 4096>
+ + + + + +
+ + + + + + + + +
std::streamsize staticlib::compress::lzma_source< Source, buf_size >::read (sl::io::span< char > span)
+
+inline
+
+ +

Read implementation.

+
Parameters
+ + +
spanoutput span
+
+
+
Returns
number of bytes written into specified span
+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + diff --git a/docs/html/classstaticlib_1_1compress_1_1zip__sink-members.html b/docs/html/classstaticlib_1_1compress_1_1zip__sink-members.html new file mode 100644 index 0000000..0bd6be3 --- /dev/null +++ b/docs/html/classstaticlib_1_1compress_1_1zip__sink-members.html @@ -0,0 +1,114 @@ + + + + + +staticlib_compress: Member List + + + + + + + + + +
+
+ + + + + + + +
+
staticlib_compress +  1.2.0 +
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Enumerations
+ + +
+ +
+ + +
+
+
+
staticlib::compress::zip_sink< Sink > Member List
+
+
+ +

This is the complete list of members for staticlib::compress::zip_sink< Sink >, including all inherited members.

+ + + + + + + + + + + +
add_entry(const std::string &filename)staticlib::compress::zip_sink< Sink >inline
finalize()staticlib::compress::zip_sink< Sink >inline
flush()staticlib::compress::zip_sink< Sink >inline
operator=(const zip_sink &)staticlib::compress::zip_sink< Sink >
operator=(zip_sink &&other)staticlib::compress::zip_sink< Sink >inline
write(sl::io::span< const char > span)staticlib::compress::zip_sink< Sink >inline
zip_sink(Sink &&sink)staticlib::compress::zip_sink< Sink >inline
zip_sink(const zip_sink &)staticlib::compress::zip_sink< Sink >
zip_sink(zip_sink &&other)staticlib::compress::zip_sink< Sink >inline
~zip_sink() STATICLIB_NOEXCEPTstaticlib::compress::zip_sink< Sink >inline
+ + + + diff --git a/docs/html/classstaticlib_1_1compress_1_1zip__sink.html b/docs/html/classstaticlib_1_1compress_1_1zip__sink.html new file mode 100644 index 0000000..80a77a6 --- /dev/null +++ b/docs/html/classstaticlib_1_1compress_1_1zip__sink.html @@ -0,0 +1,450 @@ + + + + + +staticlib_compress: staticlib::compress::zip_sink< Sink > Class Template Reference + + + + + + + + + +
+
+ + + + + + + +
+
staticlib_compress +  1.2.0 +
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Enumerations
+ + +
+ +
+ + +
+
+
+Public Member Functions | +List of all members
+
+
staticlib::compress::zip_sink< Sink > Class Template Reference
+
+
+ +

Sink wrapper that creates ZIP archives, CRC sum and compression of entries is NOT supported. + More...

+ +

#include <staticlib/compress/zip_sink.hpp>

+ + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 zip_sink (Sink &&sink)
 Constructor.
 ~zip_sink () STATICLIB_NOEXCEPT
 Destructor, will call finalize() if it have not been called yet.
 zip_sink (const zip_sink &)
 Deleted copy constructor.
zip_sink & operator= (const zip_sink &)
 Deleted copy assignment operator.
 zip_sink (zip_sink &&other)
 Move constructor.
zip_sink & operator= (zip_sink &&other)
 Move assignment operator.
std::streamsize write (sl::io::span< const char > span)
 Write implementation.
std::streamsize flush ()
 Calls flush on dest stream.
void add_entry (const std::string &filename)
 Add ZIP entry with the specified name to archive.
void finalize ()
 Finalizes ZIP archive writing Central Directory, may be safely called multiple times, will be called from destructor if not called explicitely.
+

Detailed Description

+

template<typename Sink>
+class staticlib::compress::zip_sink< Sink >

+ +

Sink wrapper that creates ZIP archives, CRC sum and compression of entries is NOT supported.

+

Constructor & Destructor Documentation

+ +
+
+
+template<typename Sink >
+ + + + + +
+ + + + + + + + +
staticlib::compress::zip_sink< Sink >::zip_sink (Sink && sink)
+
+inline
+
+ +

Constructor.

+
Parameters
+ + +
sinkdestination to write compressed data into
+
+
+ +
+
+ +
+
+
+template<typename Sink >
+ + + + + +
+ + + + + + + +
staticlib::compress::zip_sink< Sink >::~zip_sink ()
+
+inline
+
+ +

Destructor, will call finalize() if it have not been called yet.

+ +
+
+ +
+
+
+template<typename Sink >
+ + + + + + + + +
staticlib::compress::zip_sink< Sink >::zip_sink (const zip_sink< Sink > & )
+
+ +

Deleted copy constructor.

+
Parameters
+ + +
otherinstance
+
+
+ +
+
+ +
+
+
+template<typename Sink >
+ + + + + +
+ + + + + + + + +
staticlib::compress::zip_sink< Sink >::zip_sink (zip_sink< Sink > && other)
+
+inline
+
+ +

Move constructor.

+
Parameters
+ + +
otherother instance
+
+
+ +
+
+

Member Function Documentation

+ +
+
+
+template<typename Sink >
+ + + + + +
+ + + + + + + + +
void staticlib::compress::zip_sink< Sink >::add_entry (const std::string & filename)
+
+inline
+
+ +

Add ZIP entry with the specified name to archive.

+
Parameters
+ + +
filenameZIP entry name
+
+
+ +
+
+ +
+
+
+template<typename Sink >
+ + + + + +
+ + + + + + + +
void staticlib::compress::zip_sink< Sink >::finalize ()
+
+inline
+
+ +

Finalizes ZIP archive writing Central Directory, may be safely called multiple times, will be called from destructor if not called explicitely.

+ +
+
+ +
+
+
+template<typename Sink >
+ + + + + +
+ + + + + + + +
std::streamsize staticlib::compress::zip_sink< Sink >::flush ()
+
+inline
+
+ +

Calls flush on dest stream.

+
Returns
value returned by dest stream
+ +
+
+ +
+
+
+template<typename Sink >
+ + + + + + + + +
zip_sink& staticlib::compress::zip_sink< Sink >::operator= (const zip_sink< Sink > & )
+
+ +

Deleted copy assignment operator.

+
Parameters
+ + +
otherinstance
+
+
+
Returns
this instance
+ +
+
+ +
+
+
+template<typename Sink >
+ + + + + +
+ + + + + + + + +
zip_sink& staticlib::compress::zip_sink< Sink >::operator= (zip_sink< Sink > && other)
+
+inline
+
+ +

Move assignment operator.

+
Parameters
+ + +
otherother instance
+
+
+
Returns
this instance
+ +
+
+ +
+
+
+template<typename Sink >
+ + + + + +
+ + + + + + + + +
std::streamsize staticlib::compress::zip_sink< Sink >::write (sl::io::span< const char > span)
+
+inline
+
+ +

Write implementation.

+
Parameters
+ + +
spansource span
+
+
+
Returns
number of bytes processed (read from source buf)
+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + diff --git a/docs/html/closed.png b/docs/html/closed.png new file mode 100644 index 0000000..98cc2c9 Binary files /dev/null and b/docs/html/closed.png differ diff --git a/docs/html/compress_8hpp.html b/docs/html/compress_8hpp.html new file mode 100644 index 0000000..97d4894 --- /dev/null +++ b/docs/html/compress_8hpp.html @@ -0,0 +1,107 @@ + + + + + +staticlib_compress: staticlib/compress.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
staticlib_compress +  1.2.0 +
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Enumerations
+ + +
+ +
+ + +
+
+
+
compress.hpp File Reference
+
+
+
#include "staticlib/config.hpp"
+#include "staticlib/compress/compress_exception.hpp"
+#include "staticlib/compress/deflate_sink.hpp"
+#include "staticlib/compress/inflate_source.hpp"
+#include "staticlib/compress/zip_compression_method.hpp"
+#include "staticlib/compress/zip_sink.hpp"
+
+

Go to the source code of this file.

+
+ + + + diff --git a/docs/html/compress_8hpp_source.html b/docs/html/compress_8hpp_source.html new file mode 100644 index 0000000..66e4069 --- /dev/null +++ b/docs/html/compress_8hpp_source.html @@ -0,0 +1,139 @@ + + + + + +staticlib_compress: staticlib/compress.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
staticlib_compress +  1.2.0 +
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Enumerations
+ + +
+ +
+ + +
+
+
+
compress.hpp
+
+
+Go to the documentation of this file.
1 /*
+
2  * Copyright 2016, alex at staticlibs.net
+
3  *
+
4  * Licensed under the Apache License, Version 2.0 (the "License");
+
5  * you may not use this file except in compliance with the License.
+
6  * You may obtain a copy of the License at
+
7  *
+
8  * http://www.apache.org/licenses/LICENSE-2.0
+
9  *
+
10  * Unless required by applicable law or agreed to in writing, software
+
11  * distributed under the License is distributed on an "AS IS" BASIS,
+
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
13  * See the License for the specific language governing permissions and
+
14  * limitations under the License.
+
15  */
+
16 
+
17 /*
+
18  * File: compress.hpp
+
19  * Author: alex
+
20  *
+
21  * Created on February 4, 2016, 3:17 PM
+
22  */
+
23 
+
24 #ifndef STATICLIB_COMPRESS_HPP
+
25 #define STATICLIB_COMPRESS_HPP
+
26 
+
27 #include "staticlib/config.hpp"
+
28 
+ + + +
32 #ifdef STATCILIB_COMPRESS_ENABLE_XZ
+ + +
35 #endif // STATCILIB_COMPRESS_ENABLE_XZ
+ + +
38 
+
39 #endif /* STATICLIB_COMPRESS_HPP */
+
40 
+
+ + + + diff --git a/docs/html/compress__exception_8hpp.html b/docs/html/compress__exception_8hpp.html new file mode 100644 index 0000000..3da68b3 --- /dev/null +++ b/docs/html/compress__exception_8hpp.html @@ -0,0 +1,116 @@ + + + + + +staticlib_compress: staticlib/compress/compress_exception.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
staticlib_compress +  1.2.0 +
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Enumerations
+ + +
+ +
+ + +
+
+
+Classes | +Namespaces
+
+
compress_exception.hpp File Reference
+
+
+
#include "staticlib/support/exception.hpp"
+
+

Go to the source code of this file.

+ + + + +

+Classes

class  staticlib::compress::compress_exception
 Exception that is thrown on compression/decompression error. More...
+ + + +

+Namespaces

namespace  staticlib
namespace  staticlib::compress
+
+ + + + diff --git a/docs/html/compress__exception_8hpp_source.html b/docs/html/compress__exception_8hpp_source.html new file mode 100644 index 0000000..0e67054 --- /dev/null +++ b/docs/html/compress__exception_8hpp_source.html @@ -0,0 +1,144 @@ + + + + + +staticlib_compress: staticlib/compress/compress_exception.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
staticlib_compress +  1.2.0 +
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Enumerations
+ + +
+ +
+ + +
+
+
+
compress_exception.hpp
+
+
+Go to the documentation of this file.
1 /*
+
2  * Copyright 2016, alex at staticlibs.net
+
3  *
+
4  * Licensed under the Apache License, Version 2.0 (the "License");
+
5  * you may not use this file except in compliance with the License.
+
6  * You may obtain a copy of the License at
+
7  *
+
8  * http://www.apache.org/licenses/LICENSE-2.0
+
9  *
+
10  * Unless required by applicable law or agreed to in writing, software
+
11  * distributed under the License is distributed on an "AS IS" BASIS,
+
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
13  * See the License for the specific language governing permissions and
+
14  * limitations under the License.
+
15  */
+
16 
+
17 /*
+
18  * File: compress_exception.hpp
+
19  * Author: alex
+
20  *
+
21  * Created on January 29, 2016, 10:19 PM
+
22  */
+
23 
+
24 #ifndef STATICLIB_COMPRESS_COMPRESSEXCEPTION_HPP
+
25 #define STATICLIB_COMPRESS_COMPRESSEXCEPTION_HPP
+
26 
+
27 #include "staticlib/support/exception.hpp"
+
28 
+
29 namespace staticlib {
+
30 namespace compress {
+
31 
+
35 class compress_exception : public sl::support::exception {
+
36 public:
+
40  compress_exception() = default;
+
41 
+
47  compress_exception(const std::string& msg) :
+
48  sl::support::exception(msg) { }
+
49 
+
50 };
+
51 
+
52 } // namespace
+
53 }
+
54 
+
55 #endif /* STATICLIB_COMPRESS_COMPRESSEXCEPTION_HPP */
+
56 
+
+ + + + diff --git a/docs/html/deflate__sink_8hpp.html b/docs/html/deflate__sink_8hpp.html new file mode 100644 index 0000000..303963a --- /dev/null +++ b/docs/html/deflate__sink_8hpp.html @@ -0,0 +1,136 @@ + + + + + +staticlib_compress: staticlib/compress/deflate_sink.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
staticlib_compress +  1.2.0 +
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Enumerations
+ + +
+ +
+ + +
+
+
+Classes | +Namespaces | +Functions
+
+
deflate_sink.hpp File Reference
+
+
+
#include <cstdlib>
+#include <cstring>
+#include <ios>
+#include <memory>
+#include <type_traits>
+#include "zlib.h"
+#include "staticlib/config.hpp"
+#include "staticlib/io.hpp"
+#include "staticlib/support.hpp"
+#include "staticlib/compress/compress_exception.hpp"
+
+

Go to the source code of this file.

+ + + + +

+Classes

class  staticlib::compress::deflate_sink< Sink, compression_level, buf_size >
 Sink wrapper that compressed written data using Deflate algorithm. More...
+ + + +

+Namespaces

namespace  staticlib
namespace  staticlib::compress
+ + + + + + + +

+Functions

template<typename Sink , class = typename std::enable_if<!std::is_lvalue_reference<Sink>::value>::type>
deflate_sink< Sink > staticlib::compress::make_deflate_sink (Sink &&sink)
 Factory function for creating deflate sinks, created object will own the specified sink.
template<typename Sink >
deflate_sink
+< sl::io::reference_sink< Sink > > 
staticlib::compress::make_deflate_sink (Sink &sink)
 Factory function for creating deflate sinks, created object will NOT own the specified sink.
+
+ + + + diff --git a/docs/html/deflate__sink_8hpp_source.html b/docs/html/deflate__sink_8hpp_source.html new file mode 100644 index 0000000..6ae11e0 --- /dev/null +++ b/docs/html/deflate__sink_8hpp_source.html @@ -0,0 +1,268 @@ + + + + + +staticlib_compress: staticlib/compress/deflate_sink.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
staticlib_compress +  1.2.0 +
+
+
+ + + + + + +
+ All Classes Namespaces Files Functions Enumerations
+ + +
+ +
+ + +
+
+
+
deflate_sink.hpp
+
+
+Go to the documentation of this file.
1 /*
+
2  * Copyright 2016, alex at staticlibs.net
+
3  *
+
4  * Licensed under the Apache License, Version 2.0 (the "License");
+
5  * you may not use this file except in compliance with the License.
+
6  * You may obtain a copy of the License at
+
7  *
+
8  * http://www.apache.org/licenses/LICENSE-2.0
+
9  *
+
10  * Unless required by applicable law or agreed to in writing, software
+
11  * distributed under the License is distributed on an "AS IS" BASIS,
+
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
13  * See the License for the specific language governing permissions and
+
14  * limitations under the License.
+
15  */
+
16 
+
17 /*
+
18  * File: deflate_sink.hpp
+
19  * Author: alex
+
20  *
+
21  * Created on January 29, 2016, 9:19 PM
+
22  */
+
23 
+
24 #ifndef STATICLIB_COMPRESS_DEFLATE_SINK_HPP
+
25 #define STATICLIB_COMPRESS_DEFLATE_SINK_HPP
+
26 
+
27 #include <cstdlib>
+
28 #include <cstring>
+
29 #include <ios>
+
30 #include <memory>
+
31 #include <type_traits>
+
32 
+
33 #include "zlib.h"
+
34 
+
35 #include "staticlib/config.hpp"
+
36 #include "staticlib/io.hpp"
+
37 #include "staticlib/support.hpp"
+
38 
+ +
40 
+
41 namespace staticlib {
+
42 namespace compress {
+
43 
+
47 template <typename Sink, int compression_level = 6, std::size_t buf_size = 4096>
+
48 class deflate_sink {
+
52  Sink sink;
+
56  std::array<char, buf_size> buf;
+
60  z_stream* strm;
+
61 
+
62 public:
+
63 
+
69  deflate_sink(Sink&& sink) :
+
70  sink(std::move(sink)),
+
71  strm([] {
+
72  z_stream* stream = static_cast<z_stream*> (std::malloc(sizeof(z_stream)));
+
73  if (nullptr == stream) throw compress_exception(TRACEMSG(
+
74  "Error creating deflate stream: 'malloc' failed"));
+
75  std::memset(stream, 0, sizeof (z_stream));
+
76  auto err = deflateInit2(stream, compression_level, Z_DEFLATED, -MAX_WBITS, 8, Z_DEFAULT_STRATEGY);
+
77  if (Z_OK != err) throw compress_exception(TRACEMSG(
+
78  "Error initializing deflate stream: [" + ::zError(err) + "]"));
+
79  return stream;
+
80  }()) { }
+
81 
+
82  ~deflate_sink() STATICLIB_NOEXCEPT {
+
83  if (nullptr == strm) return;
+
84  auto deferred = sl::support::defer([this]() STATICLIB_NOEXCEPT {
+
85  ::deflateEnd(this->strm);
+
86  ::free(this->strm);
+
87  });
+
88  // finish encoding
+
89  strm->next_in = nullptr;
+
90  strm->avail_in = 0;
+
91  strm->next_out = reinterpret_cast<unsigned char*> (buf.data());
+
92  strm->avail_out = static_cast<uInt> (buf.size());
+
93  // call deflate
+
94  bool deflating = true;
+
95  while(deflating) {
+
96  auto err = ::deflate(strm, Z_FINISH);
+
97  // cannot report any error safely - we are in destructor
+
98  switch (err) {
+
99  case Z_OK:
+
100  sl::io::write_all(sink, {buf.data(), buf.size() - strm->avail_out});
+
101  strm->next_out = reinterpret_cast<unsigned char*> (buf.data());
+
102  strm->avail_out = static_cast<uInt> (buf.size());
+
103  // still not finished
+
104  break;
+
105  case Z_STREAM_END:
+
106  sl::io::write_all(sink, {buf.data(), buf.size() - strm->avail_out});
+
107  // finished
+
108  deflating = false;
+
109  break;
+
110  default:
+
111  // finish
+
112  deflating = false;
+
113  }
+
114  }
+
115  }
+
116 
+
122  deflate_sink(const deflate_sink&) = delete;
+
123 
+
130  deflate_sink& operator=(const deflate_sink&) = delete;
+
131 
+ +
138  sink(std::move(other.sink)),
+
139  buf(std::move(other.buf)),
+
140  strm(other.strm) {
+
141  other.strm = nullptr;
+
142  }
+
143 
+ +
151  sink = std::move(other.sink);
+
152  buf = std::move(other.buf);
+
153  strm = other.strm;
+
154  other.strm = nullptr;
+
155  return *this;
+
156  }
+
157 
+
164  std::streamsize write(sl::io::span<const char> span) {
+
165  // prepare zlib stream
+
166  strm->next_in = reinterpret_cast<const unsigned char*> (span.data());
+
167  strm->avail_in = static_cast<uInt> (span.size());
+
168  strm->next_out = reinterpret_cast<unsigned char*> (buf.data());
+
169  strm->avail_out = static_cast<uInt> (buf.size());
+
170  // call deflate
+
171  while(strm->avail_in > 0) {
+
172  auto err = ::deflate(strm, Z_NO_FLUSH);
+
173  switch (err) {
+
174  case Z_OK:
+
175  sl::io::write_all(sink, {buf.data(), buf.size() - strm->avail_out});
+
176  strm->next_out = reinterpret_cast<unsigned char*> (buf.data());
+
177  strm->avail_out = static_cast<uInt> (buf.size());
+
178  break;
+
179  default: throw compress_exception(TRACEMSG(
+
180  "Deflate error: [" + ::zError(err) + "]"));
+
181  }
+
182  }
+
183  return span.size_signed();
+
184  }
+
185 
+
191  std::streamsize flush() {
+
192  // note: maybe it is better to enable Z_SYNC_FLUSH support,
+
193  // but it will make output result non-deterministic
+
194  return sink.flush();
+
195  }
+
196 
+
202  Sink& get_sink() {
+
203  return sink;
+
204  }
+
205 
+
206 };
+
207 
+
215 template <typename Sink,
+
216  class = typename std::enable_if<!std::is_lvalue_reference<Sink>::value>::type>
+ +
218  return deflate_sink<Sink>(std::move(sink));
+
219 }
+
220 
+
228 template <typename Sink>
+ + +
231  sl::io::make_reference_sink(sink));
+
232 }
+
233 
+
234 } // namespace
+
235 }
+
236 
+
237 #endif /* STATICLIB_COMPRESS_DEFLATE_SINK_HPP */
+
238 
+
+ + + + diff --git a/docs/html/dir_9c69452d0faf53d042ffc575a168f626.html b/docs/html/dir_9c69452d0faf53d042ffc575a168f626.html new file mode 100644 index 0000000..d9019ae --- /dev/null +++ b/docs/html/dir_9c69452d0faf53d042ffc575a168f626.html @@ -0,0 +1,105 @@ + + + + + +staticlib_compress: staticlib/compress/ Directory Reference + + + + + + + + + +
+
+ + + + + + + +
+
staticlib_compress +  1.2.0 +
+
+
+ + + + + +
+ All Classes Namespaces Files Functions Enumerations
+ + +
+ +
+ + +
+
+
+
compress Directory Reference
+
+
+ + + + + + + + + +

+Files

file  compress_exception.hpp [code]
file  deflate_sink.hpp [code]
file  inflate_source.hpp [code]
file  lzma_sink.hpp [code]
file  lzma_source.hpp [code]
file  zip_compression_method.hpp [code]
file  zip_sink.hpp [code]
+
+ + + + diff --git a/docs/html/dir_c33d3ca81783b96de1fd366e75cb14d0.html b/docs/html/dir_c33d3ca81783b96de1fd366e75cb14d0.html new file mode 100644 index 0000000..aa61546 --- /dev/null +++ b/docs/html/dir_c33d3ca81783b96de1fd366e75cb14d0.html @@ -0,0 +1,103 @@ + + + + + +staticlib_compress: staticlib/ Directory Reference + + + + + + + + + +
+
+ + + + + + + +
+
staticlib_compress +  1.2.0 +
+
+
+ + + + + +
+ All Classes Namespaces Files Functions Enumerations
+ + +
+ +
+ + +
+
+
+
staticlib Directory Reference
+
+
+ + + +

+Directories

directory  compress
+ + +

+Files

file  compress.hpp [code]
+
+ + + + diff --git a/docs/html/doxygen.css b/docs/html/doxygen.css new file mode 100644 index 0000000..0c559a0 --- /dev/null +++ b/docs/html/doxygen.css @@ -0,0 +1,1163 @@ +/* The standard CSS for doxygen */ + +body, table, div, p, dl { + font: 400 14px/19px Roboto,sans-serif; +} + +/* @group Heading Levels */ + +h1 { + font-size: 150%; +} + +.title { + font-size: 150%; + font-weight: bold; + margin: 10px 2px; +} + +h2 { + border-bottom: 1px solid #879ECB; + color: #354C7B; + font-size: 150%; + font-weight: normal; + margin-top: 1.75em; + padding-top: 8px; + padding-bottom: 4px; + width: 100%; +} + +h3 { + font-size: 100%; +} + +h1, h2, h3, h4, h5, h6 { + -webkit-transition: text-shadow 0.5s linear; + -moz-transition: text-shadow 0.5s linear; + -ms-transition: text-shadow 0.5s linear; + -o-transition: text-shadow 0.5s linear; + transition: text-shadow 0.5s linear; + margin-right: 15px; +} + +h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow { + text-shadow: 0 0 15px cyan; +} + +dt { + font-weight: bold; +} + +div.multicol { + -moz-column-gap: 1em; + -webkit-column-gap: 1em; + -moz-column-count: 3; + -webkit-column-count: 3; +} + +p.startli, p.startdd, p.starttd { + margin-top: 2px; +} + +p.endli { + margin-bottom: 0px; +} + +p.enddd { + margin-bottom: 4px; +} + +p.endtd { + margin-bottom: 2px; +} + +/* @end */ + +caption { + font-weight: bold; +} + +span.legend { + font-size: 70%; + text-align: center; +} + +h3.version { + font-size: 90%; + text-align: center; +} + +div.qindex, div.navtab{ + background-color: #EBEFF6; + border: 1px solid #A3B4D7; + text-align: center; +} + +div.qindex, div.navpath { + width: 100%; + line-height: 140%; +} + +div.navtab { + margin-right: 15px; +} + +/* @group Link Styling */ + +a { + color: #3D578C; + font-weight: normal; + text-decoration: none; +} + +.contents a:visited { + color: #4665A2; +} + +a:hover { + text-decoration: underline; +} + +a.qindex { + font-weight: bold; +} + +a.qindexHL { + font-weight: bold; + background-color: #9CAFD4; + color: #ffffff; + border: 1px double #869DCA; +} + +.contents a.qindexHL:visited { + color: #ffffff; +} + +a.el { + font-weight: bold; +} + +a.elRef { +} + +a.code, a.code:visited { + color: #4665A2; +} + +a.codeRef, a.codeRef:visited { + color: #4665A2; +} + +/* @end */ + +dl.el { + margin-left: -1cm; +} + +pre.fragment { + border: 1px solid #C4CFE5; + background-color: #FBFCFD; + padding: 4px 6px; + margin: 4px 8px 4px 2px; + overflow: auto; + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; + font-family: monospace, fixed; + font-size: 105%; +} + +div.fragment { + padding: 4px; + margin: 4px; + background-color: #FBFCFD; + border: 1px solid #C4CFE5; +} + +div.line { + font-family: monospace, fixed; + font-size: 13px; + min-height: 13px; + line-height: 1.0; + text-wrap: unrestricted; + white-space: -moz-pre-wrap; /* Moz */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: pre-wrap; /* CSS3 */ + word-wrap: break-word; /* IE 5.5+ */ + text-indent: -53px; + padding-left: 53px; + padding-bottom: 0px; + margin: 0px; + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} + +div.line.glow { + background-color: cyan; + box-shadow: 0 0 10px cyan; +} + + +span.lineno { + padding-right: 4px; + text-align: right; + border-right: 2px solid #0F0; + background-color: #E8E8E8; + white-space: pre; +} +span.lineno a { + background-color: #D8D8D8; +} + +span.lineno a:hover { + background-color: #C8C8C8; +} + +div.ah { + background-color: black; + font-weight: bold; + color: #ffffff; + margin-bottom: 3px; + margin-top: 3px; + padding: 0.2em; + border: solid thin #333; + border-radius: 0.5em; + -webkit-border-radius: .5em; + -moz-border-radius: .5em; + box-shadow: 2px 2px 3px #999; + -webkit-box-shadow: 2px 2px 3px #999; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; + background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444)); + background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000); +} + +div.groupHeader { + margin-left: 16px; + margin-top: 12px; + font-weight: bold; +} + +div.groupText { + margin-left: 16px; + font-style: italic; +} + +body { + background-color: white; + color: black; + margin: 0; +} + +div.contents { + margin-top: 10px; + margin-left: 12px; + margin-right: 8px; +} + +td.indexkey { + background-color: #EBEFF6; + font-weight: bold; + border: 1px solid #C4CFE5; + margin: 2px 0px 2px 0; + padding: 2px 10px; + white-space: nowrap; + vertical-align: top; +} + +td.indexvalue { + background-color: #EBEFF6; + border: 1px solid #C4CFE5; + padding: 2px 10px; + margin: 2px 0px; +} + +tr.memlist { + background-color: #EEF1F7; +} + +p.formulaDsp { + text-align: center; +} + +img.formulaDsp { + +} + +img.formulaInl { + vertical-align: middle; +} + +div.center { + text-align: center; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; +} + +div.center img { + border: 0px; +} + +address.footer { + text-align: right; + padding-right: 12px; +} + +img.footer { + border: 0px; + vertical-align: middle; +} + +/* @group Code Colorization */ + +span.keyword { + color: #008000 +} + +span.keywordtype { + color: #604020 +} + +span.keywordflow { + color: #e08000 +} + +span.comment { + color: #800000 +} + +span.preprocessor { + color: #806020 +} + +span.stringliteral { + color: #002080 +} + +span.charliteral { + color: #008080 +} + +span.vhdldigit { + color: #ff00ff +} + +span.vhdlchar { + color: #000000 +} + +span.vhdlkeyword { + color: #700070 +} + +span.vhdllogic { + color: #ff0000 +} + +blockquote { + background-color: #F7F8FB; + border-left: 2px solid #9CAFD4; + margin: 0 24px 0 4px; + padding: 0 12px 0 16px; +} + +/* @end */ + +/* +.search { + color: #003399; + font-weight: bold; +} + +form.search { + margin-bottom: 0px; + margin-top: 0px; +} + +input.search { + font-size: 75%; + color: #000080; + font-weight: normal; + background-color: #e8eef2; +} +*/ + +td.tiny { + font-size: 75%; +} + +.dirtab { + padding: 4px; + border-collapse: collapse; + border: 1px solid #A3B4D7; +} + +th.dirtab { + background: #EBEFF6; + font-weight: bold; +} + +hr { + height: 0px; + border: none; + border-top: 1px solid #4A6AAA; +} + +hr.footer { + height: 1px; +} + +/* @group Member Descriptions */ + +table.memberdecls { + border-spacing: 0px; + padding: 0px; +} + +.memberdecls td, .fieldtable tr { + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} + +.memberdecls td.glow, .fieldtable tr.glow { + background-color: cyan; + box-shadow: 0 0 15px cyan; +} + +.mdescLeft, .mdescRight, +.memItemLeft, .memItemRight, +.memTemplItemLeft, .memTemplItemRight, .memTemplParams { + background-color: #F9FAFC; + border: none; + margin: 4px; + padding: 1px 0 0 8px; +} + +.mdescLeft, .mdescRight { + padding: 0px 8px 4px 8px; + color: #555; +} + +.memItemLeft, .memItemRight, .memTemplParams { + border-bottom: 1px solid #DEE4F0; +} + +.memItemLeft, .memTemplItemLeft { + white-space: nowrap; +} + +.memItemRight { + width: 100%; +} + +.memTemplParams { + color: #4665A2; + white-space: nowrap; +} + +/* @end */ + +/* @group Member Details */ + +/* Styles for detailed member documentation */ + +.memtemplate { + font-size: 80%; + color: #4665A2; + font-weight: normal; + margin-left: 9px; +} + +.memnav { + background-color: #EBEFF6; + border: 1px solid #A3B4D7; + text-align: center; + margin: 2px; + margin-right: 15px; + padding: 2px; +} + +.mempage { + width: 100%; +} + +.memitem { + padding: 0; + margin-bottom: 10px; + margin-right: 5px; + -webkit-transition: box-shadow 0.5s linear; + -moz-transition: box-shadow 0.5s linear; + -ms-transition: box-shadow 0.5s linear; + -o-transition: box-shadow 0.5s linear; + transition: box-shadow 0.5s linear; + display: table !important; + width: 100%; +} + +.memitem.glow { + box-shadow: 0 0 15px cyan; +} + +.memname { + font-weight: bold; + margin-left: 6px; +} + +.memname td { + vertical-align: bottom; +} + +.memproto, dl.reflist dt { + border-top: 1px solid #A8B8D9; + border-left: 1px solid #A8B8D9; + border-right: 1px solid #A8B8D9; + padding: 6px 0px 6px 0px; + color: #253555; + font-weight: bold; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + background-image:url('nav_f.png'); + background-repeat:repeat-x; + background-color: #E2E8F2; + /* opera specific markup */ + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + border-top-right-radius: 4px; + border-top-left-radius: 4px; + /* firefox specific markup */ + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + -moz-border-radius-topright: 4px; + -moz-border-radius-topleft: 4px; + /* webkit specific markup */ + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + -webkit-border-top-right-radius: 4px; + -webkit-border-top-left-radius: 4px; + +} + +.memdoc, dl.reflist dd { + border-bottom: 1px solid #A8B8D9; + border-left: 1px solid #A8B8D9; + border-right: 1px solid #A8B8D9; + padding: 6px 10px 2px 10px; + background-color: #FBFCFD; + border-top-width: 0; + background-image:url('nav_g.png'); + background-repeat:repeat-x; + background-color: #FFFFFF; + /* opera specific markup */ + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + /* firefox specific markup */ + -moz-border-radius-bottomleft: 4px; + -moz-border-radius-bottomright: 4px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + /* webkit specific markup */ + -webkit-border-bottom-left-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); +} + +dl.reflist dt { + padding: 5px; +} + +dl.reflist dd { + margin: 0px 0px 10px 0px; + padding: 5px; +} + +.paramkey { + text-align: right; +} + +.paramtype { + white-space: nowrap; +} + +.paramname { + color: #602020; + white-space: nowrap; +} +.paramname em { + font-style: normal; +} +.paramname code { + line-height: 14px; +} + +.params, .retval, .exception, .tparams { + margin-left: 0px; + padding-left: 0px; +} + +.params .paramname, .retval .paramname { + font-weight: bold; + vertical-align: top; +} + +.params .paramtype { + font-style: italic; + vertical-align: top; +} + +.params .paramdir { + font-family: "courier new",courier,monospace; + vertical-align: top; +} + +table.mlabels { + border-spacing: 0px; +} + +td.mlabels-left { + width: 100%; + padding: 0px; +} + +td.mlabels-right { + vertical-align: bottom; + padding: 0px; + white-space: nowrap; +} + +span.mlabels { + margin-left: 8px; +} + +span.mlabel { + background-color: #728DC1; + border-top:1px solid #5373B4; + border-left:1px solid #5373B4; + border-right:1px solid #C4CFE5; + border-bottom:1px solid #C4CFE5; + text-shadow: none; + color: white; + margin-right: 4px; + padding: 2px 3px; + border-radius: 3px; + font-size: 7pt; + white-space: nowrap; +} + + + +/* @end */ + +/* these are for tree view when not used as main index */ + +div.directory { + margin: 10px 0px; + border-top: 1px solid #A8B8D9; + border-bottom: 1px solid #A8B8D9; + width: 100%; +} + +.directory table { + border-collapse:collapse; +} + +.directory td { + margin: 0px; + padding: 0px; + vertical-align: top; +} + +.directory td.entry { + white-space: nowrap; + padding-right: 6px; +} + +.directory td.entry a { + outline:none; +} + +.directory td.entry a img { + border: none; +} + +.directory td.desc { + width: 100%; + padding-left: 6px; + padding-right: 6px; + padding-top: 3px; + border-left: 1px solid rgba(0,0,0,0.05); +} + +.directory tr.even { + padding-left: 6px; + background-color: #F7F8FB; +} + +.directory img { + vertical-align: -30%; +} + +.directory .levels { + white-space: nowrap; + width: 100%; + text-align: right; + font-size: 9pt; +} + +.directory .levels span { + cursor: pointer; + padding-left: 2px; + padding-right: 2px; + color: #3D578C; +} + +div.dynheader { + margin-top: 8px; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +address { + font-style: normal; + color: #2A3D61; +} + +table.doxtable { + border-collapse:collapse; + margin-top: 4px; + margin-bottom: 4px; +} + +table.doxtable td, table.doxtable th { + border: 1px solid #2D4068; + padding: 3px 7px 2px; +} + +table.doxtable th { + background-color: #374F7F; + color: #FFFFFF; + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; +} + +table.fieldtable { + width: 100%; + margin-bottom: 10px; + border: 1px solid #A8B8D9; + border-spacing: 0px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; + -webkit-box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); + box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); +} + +.fieldtable td, .fieldtable th { + padding: 3px 7px 2px; +} + +.fieldtable td.fieldtype, .fieldtable td.fieldname { + white-space: nowrap; + border-right: 1px solid #A8B8D9; + border-bottom: 1px solid #A8B8D9; + vertical-align: top; +} + +.fieldtable td.fielddoc { + border-bottom: 1px solid #A8B8D9; + width: 100%; +} + +.fieldtable tr:last-child td { + border-bottom: none; +} + +.fieldtable th { + background-image:url('nav_f.png'); + background-repeat:repeat-x; + background-color: #E2E8F2; + font-size: 90%; + color: #253555; + padding-bottom: 4px; + padding-top: 5px; + text-align:left; + -moz-border-radius-topleft: 4px; + -moz-border-radius-topright: 4px; + -webkit-border-top-left-radius: 4px; + -webkit-border-top-right-radius: 4px; + border-top-left-radius: 4px; + border-top-right-radius: 4px; + border-bottom: 1px solid #A8B8D9; +} + + +.tabsearch { + top: 0px; + left: 10px; + height: 36px; + background-image: url('tab_b.png'); + z-index: 101; + overflow: hidden; + font-size: 13px; +} + +.navpath ul +{ + font-size: 11px; + background-image:url('tab_b.png'); + background-repeat:repeat-x; + height:30px; + line-height:30px; + color:#8AA0CC; + border:solid 1px #C2CDE4; + overflow:hidden; + margin:0px; + padding:0px; +} + +.navpath li +{ + list-style-type:none; + float:left; + padding-left:10px; + padding-right:15px; + background-image:url('bc_s.png'); + background-repeat:no-repeat; + background-position:right; + color:#364D7C; +} + +.navpath li.navelem a +{ + height:32px; + display:block; + text-decoration: none; + outline: none; + font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; +} + +.navpath li.navelem a:hover +{ + color:#6884BD; +} + +.navpath li.footer +{ + list-style-type:none; + float:right; + padding-left:10px; + padding-right:15px; + background-image:none; + background-repeat:no-repeat; + background-position:right; + color:#364D7C; + font-size: 8pt; +} + + +div.summary +{ + float: right; + font-size: 8pt; + padding-right: 5px; + width: 50%; + text-align: right; +} + +div.summary a +{ + white-space: nowrap; +} + +div.ingroups +{ + font-size: 8pt; + width: 50%; + text-align: left; +} + +div.ingroups a +{ + white-space: nowrap; +} + +div.header +{ + background-image:url('nav_h.png'); + background-repeat:repeat-x; + background-color: #F9FAFC; + margin: 0px; + border-bottom: 1px solid #C4CFE5; +} + +div.headertitle +{ + padding: 5px 5px 5px 10px; +} + +dl +{ + padding: 0 0 0 10px; +} + +/* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug */ +dl.section +{ + margin-left: 0px; + padding-left: 0px; +} + +dl.note +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #D0C000; +} + +dl.warning, dl.attention +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #FF0000; +} + +dl.pre, dl.post, dl.invariant +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #00D000; +} + +dl.deprecated +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #505050; +} + +dl.todo +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #00C0E0; +} + +dl.test +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #3030E0; +} + +dl.bug +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #C08050; +} + +dl.section dd { + margin-bottom: 6px; +} + + +#projectlogo +{ + text-align: center; + vertical-align: bottom; + border-collapse: separate; +} + +#projectlogo img +{ + border: 0px none; +} + +#projectname +{ + font: 300% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 2px 0px; +} + +#projectbrief +{ + font: 120% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 0px; +} + +#projectnumber +{ + font: 50% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 0px; +} + +#titlearea +{ + padding: 0px; + margin: 0px; + width: 100%; + border-bottom: 1px solid #5373B4; +} + +.image +{ + text-align: center; +} + +.dotgraph +{ + text-align: center; +} + +.mscgraph +{ + text-align: center; +} + +.caption +{ + font-weight: bold; +} + +div.zoom +{ + border: 1px solid #90A5CE; +} + +dl.citelist { + margin-bottom:50px; +} + +dl.citelist dt { + color:#334975; + float:left; + font-weight:bold; + margin-right:10px; + padding:5px; +} + +dl.citelist dd { + margin:2px 0; + padding:5px 0; +} + +div.toc { + padding: 14px 25px; + background-color: #F4F6FA; + border: 1px solid #D8DFEE; + border-radius: 7px 7px 7px 7px; + float: right; + height: auto; + margin: 0 20px 10px 10px; + width: 200px; +} + +div.toc li { + background: url("bdwn.png") no-repeat scroll 0 5px transparent; + font: 10px/1.2 Verdana,DejaVu Sans,Geneva,sans-serif; + margin-top: 5px; + padding-left: 10px; + padding-top: 2px; +} + +div.toc h3 { + font: bold 12px/1.2 Arial,FreeSans,sans-serif; + color: #4665A2; + border-bottom: 0 none; + margin: 0; +} + +div.toc ul { + list-style: none outside none; + border: medium none; + padding: 0px; +} + +div.toc li.level1 { + margin-left: 0px; +} + +div.toc li.level2 { + margin-left: 15px; +} + +div.toc li.level3 { + margin-left: 30px; +} + +div.toc li.level4 { + margin-left: 45px; +} + +.inherit_header { + font-weight: bold; + color: gray; + cursor: pointer; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.inherit_header td { + padding: 6px 0px 2px 5px; +} + +.inherit { + display: none; +} + +tr.heading h2 { + margin-top: 12px; + margin-bottom: 4px; +} + +@media print +{ + #top { display: none; } + #side-nav { display: none; } + #nav-path { display: none; } + body { overflow:visible; } + h1, h2, h3, h4, h5, h6 { page-break-after: avoid; } + .summary { display: none; } + .memitem { page-break-inside: avoid; } + #doc-content + { + margin-left:0 !important; + height:auto !important; + width:auto !important; + overflow:inherit; + display:inline; + } +} + diff --git a/docs/html/doxygen.png b/docs/html/doxygen.png new file mode 100644 index 0000000..3ff17d8 Binary files /dev/null and b/docs/html/doxygen.png differ diff --git a/docs/html/dynsections.js b/docs/html/dynsections.js new file mode 100644 index 0000000..116542f --- /dev/null +++ b/docs/html/dynsections.js @@ -0,0 +1,78 @@ +function toggleVisibility(linkObj) +{ + var base = $(linkObj).attr('id'); + var summary = $('#'+base+'-summary'); + var content = $('#'+base+'-content'); + var trigger = $('#'+base+'-trigger'); + var src=$(trigger).attr('src'); + if (content.is(':visible')===true) { + content.hide(); + summary.show(); + $(linkObj).addClass('closed').removeClass('opened'); + $(trigger).attr('src',src.substring(0,src.length-8)+'closed.png'); + } else { + content.show(); + summary.hide(); + $(linkObj).removeClass('closed').addClass('opened'); + $(trigger).attr('src',src.substring(0,src.length-10)+'open.png'); + } + return false; +} + +function updateStripes() +{ + $('table.directory tr'). + removeClass('even').filter(':visible:even').addClass('even'); +} +function toggleLevel(level) +{ + $('table.directory tr').each(function(){ + var l = this.id.split('_').length-1; + var i = $('#img'+this.id.substring(3)); + var a = $('#arr'+this.id.substring(3)); + if (l + + + + +staticlib_compress: File List + + + + + + + + + +
+
+ + + + + + + +
+
staticlib_compress +  1.2.0 +
+
+
+ + + + + +
+ +
+ All Classes Namespaces Files Functions Enumerations
+ + +
+ +
+ +
+
+
File List
+
+
+
Here is a list of all files with brief descriptions:
+
+ + + + diff --git a/docs/html/ftv2blank.png b/docs/html/ftv2blank.png new file mode 100644 index 0000000..63c605b Binary files /dev/null and b/docs/html/ftv2blank.png differ diff --git a/docs/html/ftv2cl.png b/docs/html/ftv2cl.png new file mode 100644 index 0000000..132f657 Binary files /dev/null and b/docs/html/ftv2cl.png differ diff --git a/docs/html/ftv2doc.png b/docs/html/ftv2doc.png new file mode 100644 index 0000000..17edabf Binary files /dev/null and b/docs/html/ftv2doc.png differ diff --git a/docs/html/ftv2folderclosed.png b/docs/html/ftv2folderclosed.png new file mode 100644 index 0000000..bb8ab35 Binary files /dev/null and b/docs/html/ftv2folderclosed.png differ diff --git a/docs/html/ftv2folderopen.png b/docs/html/ftv2folderopen.png new file mode 100644 index 0000000..d6c7f67 Binary files /dev/null and b/docs/html/ftv2folderopen.png differ diff --git a/docs/html/ftv2lastnode.png b/docs/html/ftv2lastnode.png new file mode 100644 index 0000000..63c605b Binary files /dev/null and b/docs/html/ftv2lastnode.png differ diff --git a/docs/html/ftv2link.png b/docs/html/ftv2link.png new file mode 100644 index 0000000..17edabf Binary files /dev/null and b/docs/html/ftv2link.png differ diff --git a/docs/html/ftv2mlastnode.png b/docs/html/ftv2mlastnode.png new file mode 100644 index 0000000..0b63f6d Binary files /dev/null and b/docs/html/ftv2mlastnode.png differ diff --git a/docs/html/ftv2mnode.png b/docs/html/ftv2mnode.png new file mode 100644 index 0000000..0b63f6d Binary files /dev/null and b/docs/html/ftv2mnode.png differ diff --git a/docs/html/ftv2mo.png b/docs/html/ftv2mo.png new file mode 100644 index 0000000..4bfb80f Binary files /dev/null and b/docs/html/ftv2mo.png differ diff --git a/docs/html/ftv2node.png b/docs/html/ftv2node.png new file mode 100644 index 0000000..63c605b Binary files /dev/null and b/docs/html/ftv2node.png differ diff --git a/docs/html/ftv2ns.png b/docs/html/ftv2ns.png new file mode 100644 index 0000000..72e3d71 Binary files /dev/null and b/docs/html/ftv2ns.png differ diff --git a/docs/html/ftv2plastnode.png b/docs/html/ftv2plastnode.png new file mode 100644 index 0000000..c6ee22f Binary files /dev/null and b/docs/html/ftv2plastnode.png differ diff --git a/docs/html/ftv2pnode.png b/docs/html/ftv2pnode.png new file mode 100644 index 0000000..c6ee22f Binary files /dev/null and b/docs/html/ftv2pnode.png differ diff --git a/docs/html/ftv2splitbar.png b/docs/html/ftv2splitbar.png new file mode 100644 index 0000000..fe895f2 Binary files /dev/null and b/docs/html/ftv2splitbar.png differ diff --git a/docs/html/ftv2vertline.png b/docs/html/ftv2vertline.png new file mode 100644 index 0000000..63c605b Binary files /dev/null and b/docs/html/ftv2vertline.png differ diff --git a/docs/html/functions.html b/docs/html/functions.html new file mode 100644 index 0000000..e04999e --- /dev/null +++ b/docs/html/functions.html @@ -0,0 +1,237 @@ + + + + + +staticlib_compress: Class Members + + + + + + + + + +
+
+ + + + + + + +
+
staticlib_compress +  1.2.0 +
+
+
+ + + + + + + +
+ +
+ All Classes Namespaces Files Functions Enumerations
+ + +
+ +
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- a -

+ + +

- c -

+ + +

- d -

+ + +

- f -

+ + +

- g -

+ + +

- h -

+ + +

- i -

+ + +

- l -

+ + +

- o -

+ + +

- r -

+ + +

- w -

+ + +

- z -

+ + +

- ~ -

+
+ + + + diff --git a/docs/html/functions_func.html b/docs/html/functions_func.html new file mode 100644 index 0000000..0e94117 --- /dev/null +++ b/docs/html/functions_func.html @@ -0,0 +1,237 @@ + + + + + +staticlib_compress: Class Members - Functions + + + + + + + + + +
+
+ + + + + + + +
+
staticlib_compress +  1.2.0 +
+
+
+ + + + + + + +
+ +
+ All Classes Namespaces Files Functions Enumerations
+ + +
+ +
+ +
+  + +

- a -

+ + +

- c -

+ + +

- d -

+ + +

- f -

+ + +

- g -

+ + +

- h -

+ + +

- i -

+ + +

- l -

+ + +

- o -

+ + +

- r -

+ + +

- w -

+ + +

- z -

+ + +

- ~ -

+
+ + + + diff --git a/docs/html/index.html b/docs/html/index.html new file mode 100644 index 0000000..119ddcd --- /dev/null +++ b/docs/html/index.html @@ -0,0 +1,90 @@ + + + + + +staticlib_compress: Main Page + + + + + + + + + +
+
+ + + + + + + +
+
staticlib_compress +  1.2.0 +
+
+
+ + + + +
+ +
+ All Classes Namespaces Files Functions Enumerations
+ + +
+ +
+ +
+
+
staticlib_compress Documentation
+
+
+
+ + + + diff --git a/docs/html/inflate__source_8hpp.html b/docs/html/inflate__source_8hpp.html new file mode 100644 index 0000000..54066be --- /dev/null +++ b/docs/html/inflate__source_8hpp.html @@ -0,0 +1,136 @@ + + + + + +staticlib_compress: staticlib/compress/inflate_source.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
staticlib_compress +  1.2.0 +
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
inflate_source.hpp File Reference
+
+
+
#include <cstdint>
+#include <cstring>
+#include <ios>
+#include <memory>
+#include <type_traits>
+#include "zlib.h"
+#include "staticlib/config.hpp"
+#include "staticlib/io.hpp"
+#include "staticlib/compress/compress_exception.hpp"
+
+

Go to the source code of this file.

+ + + + +

+Classes

class  staticlib::compress::inflate_source< Source, buf_size >
 Source wrapper that decompresses deflated data. More...
+ + + +

+Namespaces

namespace  staticlib
namespace  staticlib::compress
+ + + + + + + +

+Functions

template<typename Source , class = typename std::enable_if<!std::is_lvalue_reference<Source>::value>::type>
inflate_source< Source > staticlib::compress::make_inflate_source (Source &&source)
 Factory function for creating inflate sources, created object will own the specified source.
template<typename Source >
inflate_source
+< sl::io::reference_source
+< Source > > 
staticlib::compress::make_inflate_source (Source &source)
 Factory function for creating inflate sources, created object will NOT own the specified source.
+
+ + + + diff --git a/docs/html/inflate__source_8hpp_source.html b/docs/html/inflate__source_8hpp_source.html new file mode 100644 index 0000000..75579f7 --- /dev/null +++ b/docs/html/inflate__source_8hpp_source.html @@ -0,0 +1,250 @@ + + + + + +staticlib_compress: staticlib/compress/inflate_source.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
staticlib_compress +  1.2.0 +
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
inflate_source.hpp
+
+
+Go to the documentation of this file.
1 /*
+
2  * Copyright 2016, alex at staticlibs.net
+
3  *
+
4  * Licensed under the Apache License, Version 2.0 (the "License");
+
5  * you may not use this file except in compliance with the License.
+
6  * You may obtain a copy of the License at
+
7  *
+
8  * http://www.apache.org/licenses/LICENSE-2.0
+
9  *
+
10  * Unless required by applicable law or agreed to in writing, software
+
11  * distributed under the License is distributed on an "AS IS" BASIS,
+
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
13  * See the License for the specific language governing permissions and
+
14  * limitations under the License.
+
15  */
+
16 
+
17 /*
+
18  * File: inflate_source.hpp
+
19  * Author: alex
+
20  *
+
21  * Created on January 29, 2016, 9:19 PM
+
22  */
+
23 
+
24 #ifndef STATICLIB_COMPRESS_INFLATE_SOURCE_HPP
+
25 #define STATICLIB_COMPRESS_INFLATE_SOURCE_HPP
+
26 
+
27 #include <cstdint>
+
28 #include <cstring>
+
29 #include <ios>
+
30 #include <memory>
+
31 #include <type_traits>
+
32 
+
33 #include "zlib.h"
+
34 
+
35 #include "staticlib/config.hpp"
+
36 #include "staticlib/io.hpp"
+
37 
+ +
39 
+
40 
+
41 namespace staticlib {
+
42 namespace compress {
+
43 
+
47 template <typename Source, std::size_t buf_size = 4096>
+ +
52  Source src;
+
56  std::array<char, buf_size> buf;
+
60  z_stream* strm;
+
64  size_t pos = 0;
+
68  size_t avail = 0;
+
72  bool exhausted = false;
+
73 
+
74 public:
+
80  inflate_source(Source src) :
+
81  src(std::move(src)),
+
82  strm([]{
+
83  z_stream* stream = static_cast<z_stream*> (std::malloc(sizeof(z_stream)));
+
84  if (nullptr == stream) throw compress_exception(TRACEMSG(
+
85  "Error creating inflate stream: 'malloc' failed"));
+
86  std::memset(stream, 0, sizeof (z_stream));
+
87  auto err = inflateInit2(stream, -MAX_WBITS);
+
88  if (Z_OK != err) throw compress_exception(TRACEMSG(
+
89  "Error initializing inflate stream: [" + ::zError(err) + "]"));
+
90  return stream;
+
91  }()) { }
+
92 
+
93  ~inflate_source() STATICLIB_NOEXCEPT {
+
94  if (nullptr == strm) return;
+
95  ::inflateEnd(strm);
+
96  std::free(strm);
+
97  }
+
98 
+
104  inflate_source(const inflate_source&) = delete;
+
105 
+
112  inflate_source& operator=(const inflate_source&) = delete;
+
113 
+ +
120  src(std::move(other.src)),
+
121  buf(std::move(other.buf)),
+
122  strm(other.strm),
+
123  pos(other.pos),
+
124  avail(other.avail),
+
125  exhausted(other.exhausted) {
+
126  other.strm = nullptr;
+
127  }
+
128 
+ +
136  src = std::move(other.src);
+
137  buf = std::move(other.buf);
+
138  strm = other.strm;
+
139  other.strm = nullptr;
+
140  pos = other.pos;
+
141  avail = other.avail;
+
142  exhausted = other.exhausted;
+
143  return *this;
+
144  }
+
145 
+
152  std::streamsize read(sl::io::span<char> span) {
+
153  if (!exhausted) {
+
154  // fill buffer if empty
+
155  if (0 == avail) {
+
156  avail = sl::io::read_all(src, {buf.data(), buf.size()});
+
157  pos = 0;
+
158  }
+
159  // prepare zlib stream
+
160  strm->next_in = reinterpret_cast<unsigned char*> (buf.data() + pos);
+
161  strm->avail_in = static_cast<uInt> (avail);
+
162  strm->next_out = reinterpret_cast<unsigned char*> (span.data());
+
163  strm->avail_out = static_cast<uInt> (span.size());
+
164  // call inflate
+
165  auto err = ::inflate(strm, Z_FINISH);
+
166  if (Z_OK == err || Z_STREAM_END == err || Z_BUF_ERROR == err) {
+
167  std::streamsize read = avail - strm->avail_in;
+
168  std::streamsize written = span.size_signed() - strm->avail_out;
+
169  size_t uread = static_cast<size_t> (read);
+
170  pos += uread;
+
171  avail -= uread;
+
172  if (written > 0 || Z_STREAM_END != err) {
+
173  return written;
+
174  }
+
175  exhausted = true;
+
176  return std::char_traits<char>::eof();
+
177  } else throw compress_exception(TRACEMSG(
+
178  + "Inflate error: [" + ::zError(err) + "]"));
+
179  } else {
+
180  return std::char_traits<char>::eof();
+
181  }
+
182  }
+
183 
+
189  Source& get_source() {
+
190  return src;
+
191  }
+
192 
+
193 };
+
194 
+
202 template <typename Source,
+
203  class = typename std::enable_if<!std::is_lvalue_reference<Source>::value>::type>
+ +
205  return inflate_source<Source>(std::move(source));
+
206 }
+
207 
+
215 template <typename Source>
+ + +
218  sl::io::make_reference_source(source));
+
219 }
+
220 
+
221 } // namespace
+
222 }
+
223 
+
224 #endif /* STATICLIB_COMPRESS_INFLATE_SOURCE_HPP */
+
+ + + + diff --git a/docs/html/jquery.js b/docs/html/jquery.js new file mode 100644 index 0000000..63939e7 --- /dev/null +++ b/docs/html/jquery.js @@ -0,0 +1,8 @@ +/*! jQuery v1.7.1 jquery.com | jquery.org/license */ +(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!ck[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cl||(cl=c.createElement("iframe"),cl.frameBorder=cl.width=cl.height=0),b.appendChild(cl);if(!cm||!cl.createElement)cm=(cl.contentWindow||cl.contentDocument).document,cm.write((c.compatMode==="CSS1Compat"?"":"")+""),cm.close();d=cm.createElement(a),cm.body.appendChild(d),e=f.css(d,"display"),b.removeChild(cl)}ck[a]=e}return ck[a]}function cu(a,b){var c={};f.each(cq.concat.apply([],cq.slice(0,b)),function(){c[this]=a});return c}function ct(){cr=b}function cs(){setTimeout(ct,0);return cr=f.now()}function cj(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ci(){try{return new a.XMLHttpRequest}catch(b){}}function cc(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g0){if(c!=="border")for(;g=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?parseFloat(d):j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c
a",d=q.getElementsByTagName("*"),e=q.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=q.getElementsByTagName("input")[0],b={leadingWhitespace:q.firstChild.nodeType===3,tbody:!q.getElementsByTagName("tbody").length,htmlSerialize:!!q.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:q.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete q.test}catch(s){b.deleteExpando=!1}!q.addEventListener&&q.attachEvent&&q.fireEvent&&(q.attachEvent("onclick",function(){b.noCloneEvent=!1}),q.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),q.appendChild(i),k=c.createDocumentFragment(),k.appendChild(q.lastChild),b.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,k.removeChild(i),k.appendChild(q),q.innerHTML="",a.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",q.style.width="2px",q.appendChild(j),b.reliableMarginRight=(parseInt((a.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);if(q.attachEvent)for(o in{submit:1,change:1,focusin:1})n="on"+o,p=n in q,p||(q.setAttribute(n,"return;"),p=typeof q[n]=="function"),b[o+"Bubbles"]=p;k.removeChild(q),k=g=h=j=q=i=null,f(function(){var a,d,e,g,h,i,j,k,m,n,o,r=c.getElementsByTagName("body")[0];!r||(j=1,k="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",m="visibility:hidden;border:0;",n="style='"+k+"border:5px solid #000;padding:0;'",o="
"+""+"
",a=c.createElement("div"),a.style.cssText=m+"width:0;height:0;position:static;top:0;margin-top:"+j+"px",r.insertBefore(a,r.firstChild),q=c.createElement("div"),a.appendChild(q),q.innerHTML="
t
",l=q.getElementsByTagName("td"),p=l[0].offsetHeight===0,l[0].style.display="",l[1].style.display="none",b.reliableHiddenOffsets=p&&l[0].offsetHeight===0,q.innerHTML="",q.style.width=q.style.paddingLeft="1px",f.boxModel=b.boxModel=q.offsetWidth===2,typeof q.style.zoom!="undefined"&&(q.style.display="inline",q.style.zoom=1,b.inlineBlockNeedsLayout=q.offsetWidth===2,q.style.display="",q.innerHTML="
",b.shrinkWrapBlocks=q.offsetWidth!==2),q.style.cssText=k+m,q.innerHTML=o,d=q.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,i={doesNotAddBorder:e.offsetTop!==5,doesAddBorderForTableAndCells:h.offsetTop===5},e.style.position="fixed",e.style.top="20px",i.fixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",i.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,i.doesNotIncludeMarginInBodyOffset=r.offsetTop!==j,r.removeChild(a),q=a=null,f.extend(b,i))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;h=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/\bhover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")}; +f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;le&&i.push({elem:this,matches:d.slice(e)});for(j=0;j0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h0)for(h=g;h=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div
","
"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")), +f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function() +{for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1>");try{for(var c=0,d=this.length;c1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||!bc.test("<"+a.nodeName)?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=bg[l]||bg._default,n=m[0],o=b.createElement("div");b===c?bh.appendChild(o):U(b).appendChild(o),o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]===""&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return br.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bq,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bq.test(g)?g.replace(bq,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bz(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bA=function(a,b){var c,d,e;b=b.replace(bs,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b)));return c}),c.documentElement.currentStyle&&(bB=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f===null&&g&&(e=g[b])&&(f=e),!bt.test(f)&&bu.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),bz=bA||bB,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bD=/%20/g,bE=/\[\]$/,bF=/\r?\n/g,bG=/#.*$/,bH=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bI=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bJ=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bK=/^(?:GET|HEAD)$/,bL=/^\/\//,bM=/\?/,bN=/)<[^<]*)*<\/script>/gi,bO=/^(?:select|textarea)/i,bP=/\s+/,bQ=/([?&])_=[^&]*/,bR=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bS=f.fn.load,bT={},bU={},bV,bW,bX=["*/"]+["*"];try{bV=e.href}catch(bY){bV=c.createElement("a"),bV.href="",bV=bV.href}bW=bR.exec(bV.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bS)return bS.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("
").append(c.replace(bN,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bO.test(this.nodeName)||bI.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bF,"\r\n")}}):{name:b.name,value:c.replace(bF,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b_(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b_(a,b);return a},ajaxSettings:{url:bV,isLocal:bJ.test(bW[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bX},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bZ(bT),ajaxTransport:bZ(bU),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?cb(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cc(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bH.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bG,"").replace(bL,bW[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bP),d.crossDomain==null&&(r=bR.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bW[1]&&r[2]==bW[2]&&(r[3]||(r[1]==="http:"?80:443))==(bW[3]||(bW[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),b$(bT,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bK.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bM.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bQ,"$1_="+x);d.url=y+(y===d.url?(bM.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bX+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=b$(bU,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)ca(g,a[g],c,e);return d.join("&").replace(bD,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cd=f.now(),ce=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cd++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ce.test(b.url)||e&&ce.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ce,l),b.url===j&&(e&&(k=k.replace(ce,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cf=a.ActiveXObject?function(){for(var a in ch)ch[a](0,1)}:!1,cg=0,ch;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ci()||cj()}:ci,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c) +{if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cf&&delete ch[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cg,cf&&(ch||(ch={},f(a).unload(cf)),ch[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var ck={},cl,cm,cn=/^(?:toggle|show|hide)$/,co=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cp,cq=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cr;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cu("show",3),a,b,c);for(var g=0,h=this.length;g=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cy(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cy(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,d,"padding")):this[d]():null},f.fn["outer"+c]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,d,a?"margin":"border")):this[d]():null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNumeric(j)?j:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window); diff --git a/resources/logo.png b/docs/html/logo.png similarity index 100% rename from resources/logo.png rename to docs/html/logo.png diff --git a/docs/html/lzma__sink_8hpp.html b/docs/html/lzma__sink_8hpp.html new file mode 100644 index 0000000..8beebbe --- /dev/null +++ b/docs/html/lzma__sink_8hpp.html @@ -0,0 +1,137 @@ + + + + + +staticlib_compress: staticlib/compress/lzma_sink.hpp File Reference + + + + + + + + + +
+
+
+ + + + + + +
+
staticlib_compress +  1.2.0 +
+
+ + + + + + + + + + +
+ +
+ + + +
+ +
+
lzma_sink.hpp File Reference
+
+
+
#include <cstdint>
+#include <cstdlib>
+#include <cstring>
+#include <ios>
+#include <memory>
+#include <type_traits>
+#include "lzma.h"
+#include "staticlib/config.hpp"
+#include "staticlib/io.hpp"
+#include "staticlib/support.hpp"
+#include "staticlib/compress/compress_exception.hpp"
+
+

Go to the source code of this file.

+ + + + +

+Classes

class  staticlib::compress::lzma_sink< Sink, compression_level, buf_size >
 Sink wrapper that compressed written data using LZMA algorithm. More...
+ + + +

+Namespaces

namespace  staticlib
namespace  staticlib::compress
+ + + + + + + +

+Functions

template<typename Sink , class = typename std::enable_if<!std::is_lvalue_reference<Sink>::value>::type>
lzma_sink< Sink > staticlib::compress::make_lzma_sink (Sink &&sink)
 Factory function for creating lzma sinks, created object will own the specified sink.
template<typename Sink >
lzma_sink
+< sl::io::reference_sink< Sink > > 
staticlib::compress::make_lzma_sink (Sink &sink)
 Factory function for creating lzma sinks, created object will NOT own the specified sink.
+
+ + + + diff --git a/docs/html/lzma__sink_8hpp_source.html b/docs/html/lzma__sink_8hpp_source.html new file mode 100644 index 0000000..21b4b12 --- /dev/null +++ b/docs/html/lzma__sink_8hpp_source.html @@ -0,0 +1,268 @@ + + + + + +staticlib_compress: staticlib/compress/lzma_sink.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
staticlib_compress +  1.2.0 +
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
lzma_sink.hpp
+
+
+Go to the documentation of this file.
1 /*
+
2  * Copyright 2016, alex at staticlibs.net
+
3  *
+
4  * Licensed under the Apache License, Version 2.0 (the "License");
+
5  * you may not use this file except in compliance with the License.
+
6  * You may obtain a copy of the License at
+
7  *
+
8  * http://www.apache.org/licenses/LICENSE-2.0
+
9  *
+
10  * Unless required by applicable law or agreed to in writing, software
+
11  * distributed under the License is distributed on an "AS IS" BASIS,
+
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
13  * See the License for the specific language governing permissions and
+
14  * limitations under the License.
+
15  */
+
16 
+
17 /*
+
18  * File: lzma_sink.hpp
+
19  * Author: alex
+
20  *
+
21  * Created on January 29, 2016, 9:21 PM
+
22  */
+
23 
+
24 #ifndef STATICLIB_COMPRESS_LZMA_SINK_HPP
+
25 #define STATICLIB_COMPRESS_LZMA_SINK_HPP
+
26 
+
27 #include <cstdint>
+
28 #include <cstdlib>
+
29 #include <cstring>
+
30 #include <ios>
+
31 #include <memory>
+
32 #include <type_traits>
+
33 
+
34 #include "lzma.h"
+
35 
+
36 #include "staticlib/config.hpp"
+
37 #include "staticlib/io.hpp"
+
38 #include "staticlib/support.hpp"
+
39 
+ +
41 
+
42 namespace staticlib {
+
43 namespace compress {
+
44 
+
48 template <typename Sink, int compression_level = 6, std::size_t buf_size = 4096 >
+
49 class lzma_sink {
+
53  Sink sink;
+
57  std::array<char, buf_size> buf;
+
61  lzma_stream* strm;
+
62 
+
63 public:
+
64 
+
70  lzma_sink(Sink&& sink) :
+
71  sink(std::move(sink)),
+
72  strm([] {
+
73  lzma_stream* stream = static_cast<lzma_stream*> (std::malloc(sizeof(lzma_stream)));
+
74  if (nullptr == stream) throw compress_exception(TRACEMSG(
+
75  "Error creating lzma stream: 'malloc' failed"));
+
76  *stream = LZMA_STREAM_INIT;
+
77  auto err = ::lzma_easy_encoder(stream, compression_level, LZMA_CHECK_CRC64);
+
78  if (LZMA_OK != err) throw compress_exception(TRACEMSG(
+
79  "Error initializing LZMA stream, code: [" + sl::support::to_string(err) + "]"));
+
80  return stream;
+
81  }()) { }
+
82 
+
83  ~lzma_sink() STATICLIB_NOEXCEPT {
+
84  if (nullptr == strm) return;
+
85  auto deferred = sl::support::defer([this]() STATICLIB_NOEXCEPT {
+
86  ::lzma_end(this->strm);
+
87  ::free(this->strm);
+
88  });
+
89  // finish encoding
+
90  strm->next_in = nullptr;
+
91  strm->avail_in = 0;
+
92  strm->next_out = reinterpret_cast<uint8_t*>(buf.data());
+
93  strm->avail_out = buf.size();
+
94  // call code
+
95  bool coding = true;
+
96  while (coding) {
+
97  auto err = ::lzma_code(strm, LZMA_FINISH);
+
98  switch (err) {
+
99  case LZMA_OK:
+
100  sl::io::write_all(sink, {buf.data(), buf.size() - strm->avail_out});
+
101  strm->next_out = reinterpret_cast<uint8_t*>(buf.data());
+
102  strm->avail_out = buf.size();
+
103  // not finished
+
104  break;
+
105  case LZMA_STREAM_END:
+
106  sl::io::write_all(sink, {buf.data(), buf.size() - strm->avail_out});
+
107  // finished
+
108  coding = false;
+
109  break;
+
110  default:
+
111  // finish
+
112  coding = false;
+
113  }
+
114  }
+
115  }
+
116 
+
122  lzma_sink(const lzma_sink&) = delete;
+
123 
+
130  lzma_sink& operator=(const lzma_sink&) = delete;
+
131 
+
137  lzma_sink(lzma_sink&& other) :
+
138  sink(std::move(other.sink)),
+
139  buf(std::move(other.buf)),
+
140  strm(other.strm) {
+
141  other.strm = nullptr;
+
142  }
+
143 
+ +
151  sink = std::move(other.sink);
+
152  buf = std::move(other.buf);
+
153  strm = other.strm;
+
154  other.strm = nullptr;
+
155  return *this;
+
156  }
+
157 
+
164  std::streamsize write(sl::io::span<const char> span) {
+
165  // prepare lzma stream
+
166  strm->next_in = reinterpret_cast<const uint8_t*>(span.data());
+
167  strm->avail_in = static_cast<size_t> (span.size());
+
168  strm->next_out = reinterpret_cast<uint8_t*>(buf.data());
+
169  strm->avail_out = buf.size();
+
170  // call code
+
171  while (strm->avail_in > 0) {
+
172  auto err = ::lzma_code(strm, LZMA_RUN);
+
173  switch (err) {
+
174  case LZMA_OK:
+
175  sl::io::write_all(sink, {buf.data(), buf.size() - strm->avail_out});
+
176  strm->next_out = reinterpret_cast<uint8_t*>(buf.data());
+
177  strm->avail_out = buf.size();
+
178  break;
+
179  default: throw compress_exception(TRACEMSG(
+
180  "LZMA error code: [" + sl::support::to_string(err) + "]"));
+
181  }
+
182  }
+
183  return span.size_signed();
+
184  }
+
185 
+
191  std::streamsize flush() {
+
192  // note: maybe it is better to enable LZMA_SYNC_FLUSH support,
+
193  // but it will make output result non-deterministic
+
194  return sink.flush();
+
195  }
+
196 
+
202  Sink& get_sink() {
+
203  return sink;
+
204  }
+
205 };
+
206 
+
214 template <typename Sink,
+
215  class = typename std::enable_if<!std::is_lvalue_reference<Sink>::value>::type>
+ +
217  return lzma_sink<Sink>(std::move(sink));
+
218 }
+
219 
+
227 template <typename Sink>
+ + +
230  sl::io::make_reference_sink(sink));
+
231 }
+
232 
+
233 } // namespace
+
234 }
+
235 
+
236 
+
237 #endif /* STATICLIB_COMPRESS_LZMA_SINK_HPP */
+
238 
+
+ + + + diff --git a/docs/html/lzma__source_8hpp.html b/docs/html/lzma__source_8hpp.html new file mode 100644 index 0000000..7519057 --- /dev/null +++ b/docs/html/lzma__source_8hpp.html @@ -0,0 +1,137 @@ + + + + + +staticlib_compress: staticlib/compress/lzma_source.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
staticlib_compress +  1.2.0 +
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
lzma_source.hpp File Reference
+
+
+
#include <cstdint>
+#include <cstdlib>
+#include <cstring>
+#include <ios>
+#include <memory>
+#include <type_traits>
+#include "lzma.h"
+#include "staticlib/config.hpp"
+#include "staticlib/io.hpp"
+#include "staticlib/compress/compress_exception.hpp"
+
+

Go to the source code of this file.

+ + + + +

+Classes

class  staticlib::compress::lzma_source< Source, buf_size >
 Source wrapper that decompresses deflated data. More...
+ + + +

+Namespaces

namespace  staticlib
namespace  staticlib::compress
+ + + + + + + +

+Functions

template<typename Source , class = typename std::enable_if<!std::is_lvalue_reference<Source>::value>::type>
lzma_source< Source > staticlib::compress::make_lzma_source (Source &&source)
 Factory function for creating lzma sources, created object will own the specified source.
template<typename Source >
lzma_source
+< sl::io::reference_source
+< Source > > 
staticlib::compress::make_lzma_source (Source &source)
 Factory function for creating lzma sources, created object will NOT own the specified source.
+
+ + + + diff --git a/docs/html/lzma__source_8hpp_source.html b/docs/html/lzma__source_8hpp_source.html new file mode 100644 index 0000000..f5bb7f2 --- /dev/null +++ b/docs/html/lzma__source_8hpp_source.html @@ -0,0 +1,254 @@ + + + + + +staticlib_compress: staticlib/compress/lzma_source.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
staticlib_compress +  1.2.0 +
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
lzma_source.hpp
+
+
+Go to the documentation of this file.
1 /*
+
2  * Copyright 2016, alex at staticlibs.net
+
3  *
+
4  * Licensed under the Apache License, Version 2.0 (the "License");
+
5  * you may not use this file except in compliance with the License.
+
6  * You may obtain a copy of the License at
+
7  *
+
8  * http://www.apache.org/licenses/LICENSE-2.0
+
9  *
+
10  * Unless required by applicable law or agreed to in writing, software
+
11  * distributed under the License is distributed on an "AS IS" BASIS,
+
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
13  * See the License for the specific language governing permissions and
+
14  * limitations under the License.
+
15  */
+
16 
+
17 /*
+
18  * File: lzma_source.hpp
+
19  * Author: alex
+
20  *
+
21  * Created on January 29, 2016, 9:21 PM
+
22  */
+
23 
+
24 #ifndef STATICLIB_COMPRESS_LZMA_SOURCE_HPP
+
25 #define STATICLIB_COMPRESS_LZMA_SOURCE_HPP
+
26 
+
27 #include <cstdint>
+
28 #include <cstdlib>
+
29 #include <cstring>
+
30 #include <ios>
+
31 #include <memory>
+
32 #include <type_traits>
+
33 
+
34 #include "lzma.h"
+
35 
+
36 #include "staticlib/config.hpp"
+
37 #include "staticlib/io.hpp"
+
38 
+ +
40 
+
41 
+
42 namespace staticlib {
+
43 namespace compress {
+
44 
+
48 template <typename Source, std::size_t buf_size = 4096 >
+
49 class lzma_source {
+
53  Source src;
+
57  std::array<char, buf_size> buf;
+
61  lzma_stream* strm;
+
65  size_t pos = 0;
+
69  size_t avail = 0;
+
73  bool exhausted = false;
+
74 
+
75 public:
+
76 
+
82  lzma_source(Source src) :
+
83  src(std::move(src)),
+
84  strm([] {
+
85  lzma_stream* stream = static_cast<lzma_stream*> (std::malloc(sizeof(lzma_stream)));
+
86  if (nullptr == stream) throw compress_exception(TRACEMSG(
+
87  "Error creating lzma stream: 'malloc' failed"));
+
88  *stream = LZMA_STREAM_INIT;
+
89  auto err = lzma_stream_decoder(stream, UINT64_MAX, 0);
+
90  if (LZMA_OK != err) throw compress_exception(TRACEMSG(
+
91  "Error initializing LZMA stream, code: [" + sl::support::to_string(err) + "]"));
+
92  return stream;
+
93  }()) { }
+
94 
+
95  ~lzma_source() STATICLIB_NOEXCEPT {
+
96  if (nullptr == strm) return;
+
97  ::lzma_end(strm);
+
98  std::free(strm);
+
99  }
+
100 
+
106  lzma_source(const lzma_source&) = delete;
+
107 
+
114  lzma_source& operator=(const lzma_source&) = delete;
+
115 
+ +
122  src(std::move(other.src)),
+
123  buf(std::move(other.buf)),
+
124  strm(other.strm),
+
125  pos(other.pos),
+
126  avail(other.avail),
+
127  exhausted(other.exhausted) {
+
128  other.strm = nullptr;
+
129  }
+
130 
+ +
138  src = std::move(other.src);
+
139  buf = std::move(other.buf);
+
140  strm = other.strm;
+
141  other.strm = nullptr;
+
142  pos = other.pos;
+
143  avail = other.avail;
+
144  exhausted = other.exhausted;
+
145  return *this;
+
146  }
+
147 
+
154  std::streamsize read(sl::io::span<char> span) {
+
155  if (!exhausted) {
+
156  // fill buffer if empty
+
157  if (0 == avail) {
+
158  avail = sl::io::read_all(src, {buf.data(), buf.size()});
+
159  pos = 0;
+
160  }
+
161  // prepare zlib stream
+
162  strm->next_in = reinterpret_cast<uint8_t*> (buf.data() + pos);
+
163  strm->avail_in = avail;
+
164  strm->next_out = reinterpret_cast<uint8_t*> (span.data());
+
165  strm->avail_out = static_cast<size_t> (span.size());
+
166  // call inflate
+
167  auto err = ::lzma_code(strm, LZMA_RUN);
+
168  if (LZMA_OK == err || LZMA_STREAM_END == err) {
+
169  std::streamsize read = avail - strm->avail_in;
+
170  std::streamsize written = span.size_signed() - strm->avail_out;
+
171  size_t uread = static_cast<size_t> (read);
+
172  pos += uread;
+
173  avail -= uread;
+
174  if (written > 0 || LZMA_STREAM_END != err) {
+
175  return written;
+
176  }
+
177  exhausted = true;
+
178  return std::char_traits<char>::eof();
+
179  } else throw compress_exception(TRACEMSG(
+
180  + "LZMA error, code: [" + sl::support::to_string(err) + "]"));
+
181  } else {
+
182  return std::char_traits<char>::eof();
+
183  }
+
184  }
+
185 
+
191  Source& get_source() {
+
192  return src;
+
193  }
+
194 
+
195 };
+
196 
+
204 template <typename Source,
+
205 class = typename std::enable_if<!std::is_lvalue_reference<Source>::value>::type>
+ +
207  return lzma_source<Source>(std::move(source));
+
208 }
+
209 
+
217 template <typename Source>
+ + +
220  sl::io::make_reference_source(source));
+
221 }
+
222 
+
223 } // namespace
+
224 }
+
225 
+
226 
+
227 #endif /* STATICLIB_COMPRESS_LZMA_SOURCE_HPP */
+
228 
+
+ + + + diff --git a/docs/html/namespacemembers.html b/docs/html/namespacemembers.html new file mode 100644 index 0000000..95db852 --- /dev/null +++ b/docs/html/namespacemembers.html @@ -0,0 +1,122 @@ + + + + + +staticlib_compress: Namespace Members + + + + + + + + + +
+
+ + + + + + + +
+
staticlib_compress +  1.2.0 +
+
+
+ + + + + + +
+ + + + +
+ +
+ +
+
Here is a list of all namespace members with links to the namespace documentation for each member:
+
+ + + + diff --git a/docs/html/namespacemembers_enum.html b/docs/html/namespacemembers_enum.html new file mode 100644 index 0000000..56f28a5 --- /dev/null +++ b/docs/html/namespacemembers_enum.html @@ -0,0 +1,104 @@ + + + + + +staticlib_compress: Namespace Members + + + + + + + + + +
+
+ + + + + + + +
+
staticlib_compress +  1.2.0 +
+
+
+ + + + + + +
+ + + + +
+ +
+ +
+  +
+ + + + diff --git a/docs/html/namespacemembers_func.html b/docs/html/namespacemembers_func.html new file mode 100644 index 0000000..3a1a764 --- /dev/null +++ b/docs/html/namespacemembers_func.html @@ -0,0 +1,119 @@ + + + + + +staticlib_compress: Namespace Members + + + + + + + + + +
+
+ + + + + + + +
+
staticlib_compress +  1.2.0 +
+
+
+ + + + + + +
+ + + + +
+ +
+ +
+  +
+ + + + diff --git a/docs/html/namespaces.html b/docs/html/namespaces.html new file mode 100644 index 0000000..5db0701 --- /dev/null +++ b/docs/html/namespaces.html @@ -0,0 +1,101 @@ + + + + + +staticlib_compress: Namespace List + + + + + + + + + +
+
+ + + + + + + +
+
staticlib_compress +  1.2.0 +
+
+
+ + + + + +
+ + + + +
+ +
+ +
+
+
Namespace List
+
+
+
Here is a list of all namespaces with brief descriptions:
+ + +
\Nstaticlib
+
+
+ + + + diff --git a/docs/html/namespacestaticlib.html b/docs/html/namespacestaticlib.html new file mode 100644 index 0000000..2817801 --- /dev/null +++ b/docs/html/namespacestaticlib.html @@ -0,0 +1,103 @@ + + + + + +staticlib_compress: staticlib Namespace Reference + + + + + + + + + +
+
+ + + + + + + +
+
staticlib_compress +  1.2.0 +
+
+
+ + + + + + + + + +
+ +
+ +
+
+ +
+
staticlib Namespace Reference
+
+
+ + + +

+Namespaces

namespace  compress
+
+ + + + diff --git a/docs/html/namespacestaticlib_1_1compress.html b/docs/html/namespacestaticlib_1_1compress.html new file mode 100644 index 0000000..eadc056 --- /dev/null +++ b/docs/html/namespacestaticlib_1_1compress.html @@ -0,0 +1,453 @@ + + + + + +staticlib_compress: staticlib::compress Namespace Reference + + + + + + + + + +
+
+ + + + + + + +
+
staticlib_compress +  1.2.0 +
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
staticlib::compress Namespace Reference
+
+
+ + + +

+Namespaces

namespace  detail
+ + + + + + + + + + + + + +

+Classes

class  compress_exception
 Exception that is thrown on compression/decompression error. More...
class  deflate_sink
 Sink wrapper that compressed written data using Deflate algorithm. More...
class  inflate_source
 Source wrapper that decompresses deflated data. More...
class  lzma_sink
 Sink wrapper that compressed written data using LZMA algorithm. More...
class  lzma_source
 Source wrapper that decompresses deflated data. More...
class  zip_sink
 Sink wrapper that creates ZIP archives, CRC sum and compression of entries is NOT supported. More...
+ + +

+Enumerations

enum  zip_compression_method
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename Sink , class = typename std::enable_if<!std::is_lvalue_reference<Sink>::value>::type>
deflate_sink< Sink > make_deflate_sink (Sink &&sink)
 Factory function for creating deflate sinks, created object will own the specified sink.
template<typename Sink >
deflate_sink
+< sl::io::reference_sink< Sink > > 
make_deflate_sink (Sink &sink)
 Factory function for creating deflate sinks, created object will NOT own the specified sink.
template<typename Source , class = typename std::enable_if<!std::is_lvalue_reference<Source>::value>::type>
inflate_source< Source > make_inflate_source (Source &&source)
 Factory function for creating inflate sources, created object will own the specified source.
template<typename Source >
inflate_source
+< sl::io::reference_source
+< Source > > 
make_inflate_source (Source &source)
 Factory function for creating inflate sources, created object will NOT own the specified source.
template<typename Sink , class = typename std::enable_if<!std::is_lvalue_reference<Sink>::value>::type>
lzma_sink< Sink > make_lzma_sink (Sink &&sink)
 Factory function for creating lzma sinks, created object will own the specified sink.
template<typename Sink >
lzma_sink
+< sl::io::reference_sink< Sink > > 
make_lzma_sink (Sink &sink)
 Factory function for creating lzma sinks, created object will NOT own the specified sink.
template<typename Source , class = typename std::enable_if<!std::is_lvalue_reference<Source>::value>::type>
lzma_source< Source > make_lzma_source (Source &&source)
 Factory function for creating lzma sources, created object will own the specified source.
template<typename Source >
lzma_source
+< sl::io::reference_source
+< Source > > 
make_lzma_source (Source &source)
 Factory function for creating lzma sources, created object will NOT own the specified source.
template<typename Sink , class = typename std::enable_if<!std::is_lvalue_reference<Sink>::value>::type>
zip_sink< Sink > make_zip_sink (Sink &&sink)
 Factory function for creating zip sinks, created object will own the specified sink.
template<typename Sink >
zip_sink
+< sl::io::reference_sink< Sink > > 
make_zip_sink (Sink &sink)
 Factory function for creating zip sinks, created object will NOT own the specified sink.
+

Enumeration Type Documentation

+ + +

Function Documentation

+ +
+
+
+template<typename Sink , class = typename std::enable_if<!std::is_lvalue_reference<Sink>::value>::type>
+ + + + + + + + +
deflate_sink<Sink> staticlib::compress::make_deflate_sink (Sink && sink)
+
+ +

Factory function for creating deflate sinks, created object will own the specified sink.

+
Parameters
+ + +
sinkoutput sink
+
+
+
Returns
deflate sink
+ +
+
+ +
+
+
+template<typename Sink >
+ + + + + + + + +
deflate_sink<sl::io::reference_sink<Sink> > staticlib::compress::make_deflate_sink (Sink & sink)
+
+ +

Factory function for creating deflate sinks, created object will NOT own the specified sink.

+
Parameters
+ + +
sinkoutput sink
+
+
+
Returns
deflate sink
+ +
+
+ +
+
+
+template<typename Source , class = typename std::enable_if<!std::is_lvalue_reference<Source>::value>::type>
+ + + + + + + + +
inflate_source<Source> staticlib::compress::make_inflate_source (Source && source)
+
+ +

Factory function for creating inflate sources, created object will own the specified source.

+
Parameters
+ + +
sourceinput source
+
+
+
Returns
inflate source
+ +
+
+ +
+
+
+template<typename Source >
+ + + + + + + + +
inflate_source<sl::io::reference_source<Source> > staticlib::compress::make_inflate_source (Source & source)
+
+ +

Factory function for creating inflate sources, created object will NOT own the specified source.

+
Parameters
+ + +
sourceinput source
+
+
+
Returns
inflate source
+ +
+
+ +
+
+
+template<typename Sink , class = typename std::enable_if<!std::is_lvalue_reference<Sink>::value>::type>
+ + + + + + + + +
lzma_sink<Sink> staticlib::compress::make_lzma_sink (Sink && sink)
+
+ +

Factory function for creating lzma sinks, created object will own the specified sink.

+
Parameters
+ + +
sinkoutput sink
+
+
+
Returns
lzma sink
+ +
+
+ +
+
+
+template<typename Sink >
+ + + + + + + + +
lzma_sink<sl::io::reference_sink<Sink> > staticlib::compress::make_lzma_sink (Sink & sink)
+
+ +

Factory function for creating lzma sinks, created object will NOT own the specified sink.

+
Parameters
+ + +
sinkoutput sink
+
+
+
Returns
lzma sink
+ +
+
+ +
+
+
+template<typename Source , class = typename std::enable_if<!std::is_lvalue_reference<Source>::value>::type>
+ + + + + + + + +
lzma_source<Source> staticlib::compress::make_lzma_source (Source && source)
+
+ +

Factory function for creating lzma sources, created object will own the specified source.

+
Parameters
+ + +
sourceinput source
+
+
+
Returns
lzma source
+ +
+
+ +
+
+
+template<typename Source >
+ + + + + + + + +
lzma_source<sl::io::reference_source<Source> > staticlib::compress::make_lzma_source (Source & source)
+
+ +

Factory function for creating lzma sources, created object will NOT own the specified source.

+
Parameters
+ + +
sourceinput source
+
+
+
Returns
lzma source
+ +
+
+ +
+
+
+template<typename Sink , class = typename std::enable_if<!std::is_lvalue_reference<Sink>::value>::type>
+ + + + + + + + +
zip_sink<Sink> staticlib::compress::make_zip_sink (Sink && sink)
+
+ +

Factory function for creating zip sinks, created object will own the specified sink.

+
Parameters
+ + +
sinkoutput sink
+
+
+
Returns
zip sink
+ +
+
+ +
+
+
+template<typename Sink >
+ + + + + + + + +
zip_sink<sl::io::reference_sink<Sink> > staticlib::compress::make_zip_sink (Sink & sink)
+
+ +

Factory function for creating zip sinks, created object will NOT own the specified sink.

+
Parameters
+ + +
sinkoutput sink
+
+
+
Returns
zip sink
+ +
+
+
+ + + + diff --git a/docs/html/namespacestaticlib_1_1compress_1_1detail.html b/docs/html/namespacestaticlib_1_1compress_1_1detail.html new file mode 100644 index 0000000..5481065 --- /dev/null +++ b/docs/html/namespacestaticlib_1_1compress_1_1detail.html @@ -0,0 +1,155 @@ + + + + + +staticlib_compress: staticlib::compress::detail Namespace Reference + + + + + + + + + +
+
+ + + + + + + +
+
staticlib_compress +  1.2.0 +
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
staticlib::compress::detail Namespace Reference
+
+
+ + + + +

+Classes

class  Header
 https://en.wikipedia.org/wiki/Zip_%28file_format%29 More...
+ + + +

+Functions

template<typename Sink >
void write_eocd (Sink &sink, uint16_t files_count, uint32_t cd_offset, uint32_t cd_length)
+

Function Documentation

+ +
+
+
+template<typename Sink >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void staticlib::compress::detail::write_eocd (Sink & sink,
uint16_t files_count,
uint32_t cd_offset,
uint32_t cd_length 
)
+
+ +
+
+
+ + + + diff --git a/docs/html/nav_f.png b/docs/html/nav_f.png new file mode 100644 index 0000000..72a58a5 Binary files /dev/null and b/docs/html/nav_f.png differ diff --git a/docs/html/nav_g.png b/docs/html/nav_g.png new file mode 100644 index 0000000..2093a23 Binary files /dev/null and b/docs/html/nav_g.png differ diff --git a/docs/html/nav_h.png b/docs/html/nav_h.png new file mode 100644 index 0000000..33389b1 Binary files /dev/null and b/docs/html/nav_h.png differ diff --git a/docs/html/open.png b/docs/html/open.png new file mode 100644 index 0000000..30f75c7 Binary files /dev/null and b/docs/html/open.png differ diff --git a/docs/html/search/all_61.html b/docs/html/search/all_61.html new file mode 100644 index 0000000..a3164d5 --- /dev/null +++ b/docs/html/search/all_61.html @@ -0,0 +1,25 @@ + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/all_61.js b/docs/html/search/all_61.js new file mode 100644 index 0000000..ba0ceed --- /dev/null +++ b/docs/html/search/all_61.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['add_5fentry',['add_entry',['../classstaticlib_1_1compress_1_1zip__sink.html#a6fa3cb668a97c510343d78539960d81b',1,'staticlib::compress::zip_sink']]] +]; diff --git a/docs/html/search/all_63.html b/docs/html/search/all_63.html new file mode 100644 index 0000000..56b5ad1 --- /dev/null +++ b/docs/html/search/all_63.html @@ -0,0 +1,25 @@ + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/all_63.js b/docs/html/search/all_63.js new file mode 100644 index 0000000..5b373a0 --- /dev/null +++ b/docs/html/search/all_63.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['compress_2ehpp',['compress.hpp',['../compress_8hpp.html',1,'']]], + ['compress_5fexception',['compress_exception',['../classstaticlib_1_1compress_1_1compress__exception.html#a45c8bce5c61c580bfbe4cc7af94854ab',1,'staticlib::compress::compress_exception::compress_exception()'],['../classstaticlib_1_1compress_1_1compress__exception.html#a34ca2a4b66bdb7a4066e9b5209fc0945',1,'staticlib::compress::compress_exception::compress_exception(const std::string &msg)']]], + ['compress_5fexception',['compress_exception',['../classstaticlib_1_1compress_1_1compress__exception.html',1,'staticlib::compress']]], + ['compress_5fexception_2ehpp',['compress_exception.hpp',['../compress__exception_8hpp.html',1,'']]] +]; diff --git a/docs/html/search/all_64.html b/docs/html/search/all_64.html new file mode 100644 index 0000000..b53ff08 --- /dev/null +++ b/docs/html/search/all_64.html @@ -0,0 +1,25 @@ + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/all_64.js b/docs/html/search/all_64.js new file mode 100644 index 0000000..a149577 --- /dev/null +++ b/docs/html/search/all_64.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['deflate_5fsink',['deflate_sink',['../classstaticlib_1_1compress_1_1deflate__sink.html',1,'staticlib::compress']]], + ['deflate_5fsink',['deflate_sink',['../classstaticlib_1_1compress_1_1deflate__sink.html#ab72cc778c23290c191e5a7dbb6af40d9',1,'staticlib::compress::deflate_sink::deflate_sink(Sink &&sink)'],['../classstaticlib_1_1compress_1_1deflate__sink.html#acff9beb5a8b0ecc7856df1d46aea6fd0',1,'staticlib::compress::deflate_sink::deflate_sink(deflate_sink &&other)']]], + ['deflate_5fsink_2ehpp',['deflate_sink.hpp',['../deflate__sink_8hpp.html',1,'']]] +]; diff --git a/docs/html/search/all_66.html b/docs/html/search/all_66.html new file mode 100644 index 0000000..3d1f8b3 --- /dev/null +++ b/docs/html/search/all_66.html @@ -0,0 +1,25 @@ + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/all_66.js b/docs/html/search/all_66.js new file mode 100644 index 0000000..c35d918 --- /dev/null +++ b/docs/html/search/all_66.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['finalize',['finalize',['../classstaticlib_1_1compress_1_1zip__sink.html#adefcbc44dbd06699dccfd132d434382c',1,'staticlib::compress::zip_sink']]], + ['flush',['flush',['../classstaticlib_1_1compress_1_1deflate__sink.html#af275839abaa826a02cb2875c7065c3ce',1,'staticlib::compress::deflate_sink::flush()'],['../classstaticlib_1_1compress_1_1lzma__sink.html#ad2c3072e8d6fa23b1f55a4123103785d',1,'staticlib::compress::lzma_sink::flush()'],['../classstaticlib_1_1compress_1_1zip__sink.html#ac25d9cc14c7703a57e6fd97a94f5e468',1,'staticlib::compress::zip_sink::flush()']]] +]; diff --git a/docs/html/search/all_67.html b/docs/html/search/all_67.html new file mode 100644 index 0000000..41a459a --- /dev/null +++ b/docs/html/search/all_67.html @@ -0,0 +1,25 @@ + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/all_67.js b/docs/html/search/all_67.js new file mode 100644 index 0000000..9481774 --- /dev/null +++ b/docs/html/search/all_67.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['get_5fsink',['get_sink',['../classstaticlib_1_1compress_1_1deflate__sink.html#a787936f54f5f1806d08e9c36f33880ef',1,'staticlib::compress::deflate_sink::get_sink()'],['../classstaticlib_1_1compress_1_1lzma__sink.html#a20d4947ce09005e607423ec66e3c1eb5',1,'staticlib::compress::lzma_sink::get_sink()']]], + ['get_5fsource',['get_source',['../classstaticlib_1_1compress_1_1inflate__source.html#a5e440021ae79930b072c3a3ee7cde57f',1,'staticlib::compress::inflate_source::get_source()'],['../classstaticlib_1_1compress_1_1lzma__source.html#af1fda27e7bc4713cab28aac0930441de',1,'staticlib::compress::lzma_source::get_source()']]] +]; diff --git a/docs/html/search/all_68.html b/docs/html/search/all_68.html new file mode 100644 index 0000000..6df9097 --- /dev/null +++ b/docs/html/search/all_68.html @@ -0,0 +1,25 @@ + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/all_68.js b/docs/html/search/all_68.js new file mode 100644 index 0000000..c387e3d --- /dev/null +++ b/docs/html/search/all_68.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['header',['Header',['../classstaticlib_1_1compress_1_1detail_1_1Header.html',1,'staticlib::compress::detail']]], + ['header',['Header',['../classstaticlib_1_1compress_1_1detail_1_1Header.html#aa676866e402942a6f3243172876fc4c7',1,'staticlib::compress::detail::Header']]] +]; diff --git a/docs/html/search/all_69.html b/docs/html/search/all_69.html new file mode 100644 index 0000000..1a00b55 --- /dev/null +++ b/docs/html/search/all_69.html @@ -0,0 +1,25 @@ + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/all_69.js b/docs/html/search/all_69.js new file mode 100644 index 0000000..4ae8f55 --- /dev/null +++ b/docs/html/search/all_69.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['inflate_5fsource',['inflate_source',['../classstaticlib_1_1compress_1_1inflate__source.html',1,'staticlib::compress']]], + ['inflate_5fsource',['inflate_source',['../classstaticlib_1_1compress_1_1inflate__source.html#affb9fda191369e292b8f2cffbdfd2d0d',1,'staticlib::compress::inflate_source::inflate_source(Source src)'],['../classstaticlib_1_1compress_1_1inflate__source.html#a5cea2c16bb71478c5423e508882052c9',1,'staticlib::compress::inflate_source::inflate_source(inflate_source &&other)']]], + ['inflate_5fsource_2ehpp',['inflate_source.hpp',['../inflate__source_8hpp.html',1,'']]] +]; diff --git a/docs/html/search/all_6c.html b/docs/html/search/all_6c.html new file mode 100644 index 0000000..f6383cc --- /dev/null +++ b/docs/html/search/all_6c.html @@ -0,0 +1,25 @@ + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/all_6c.js b/docs/html/search/all_6c.js new file mode 100644 index 0000000..2bc5570 --- /dev/null +++ b/docs/html/search/all_6c.js @@ -0,0 +1,9 @@ +var searchData= +[ + ['lzma_5fsink',['lzma_sink',['../classstaticlib_1_1compress_1_1lzma__sink.html',1,'staticlib::compress']]], + ['lzma_5fsink',['lzma_sink',['../classstaticlib_1_1compress_1_1lzma__sink.html#a1647ec6a16cc61547b9d03c538113583',1,'staticlib::compress::lzma_sink::lzma_sink(Sink &&sink)'],['../classstaticlib_1_1compress_1_1lzma__sink.html#a5e82d459fe6ee090c3afbb61bcf91355',1,'staticlib::compress::lzma_sink::lzma_sink(lzma_sink &&other)']]], + ['lzma_5fsink_2ehpp',['lzma_sink.hpp',['../lzma__sink_8hpp.html',1,'']]], + ['lzma_5fsource',['lzma_source',['../classstaticlib_1_1compress_1_1lzma__source.html#ac31c107818ba17b6cc351f8349cd7c31',1,'staticlib::compress::lzma_source::lzma_source(Source src)'],['../classstaticlib_1_1compress_1_1lzma__source.html#ab6d6c084807be051e1d1b881cd22df1c',1,'staticlib::compress::lzma_source::lzma_source(lzma_source &&other)']]], + ['lzma_5fsource',['lzma_source',['../classstaticlib_1_1compress_1_1lzma__source.html',1,'staticlib::compress']]], + ['lzma_5fsource_2ehpp',['lzma_source.hpp',['../lzma__source_8hpp.html',1,'']]] +]; diff --git a/docs/html/search/all_6d.html b/docs/html/search/all_6d.html new file mode 100644 index 0000000..2e27d4d --- /dev/null +++ b/docs/html/search/all_6d.html @@ -0,0 +1,25 @@ + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/all_6d.js b/docs/html/search/all_6d.js new file mode 100644 index 0000000..204d47b --- /dev/null +++ b/docs/html/search/all_6d.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['make_5fdeflate_5fsink',['make_deflate_sink',['../namespacestaticlib_1_1compress.html#a63933c16dc60842b23c6267abe613d9b',1,'staticlib::compress::make_deflate_sink(Sink &&sink)'],['../namespacestaticlib_1_1compress.html#a8c012c84202eeb797564b11ab696dc4d',1,'staticlib::compress::make_deflate_sink(Sink &sink)']]], + ['make_5finflate_5fsource',['make_inflate_source',['../namespacestaticlib_1_1compress.html#a4fb912eee368198b7aa2d942d155a082',1,'staticlib::compress::make_inflate_source(Source &&source)'],['../namespacestaticlib_1_1compress.html#a2ecd78d6a52acab599d52ed75b0a9774',1,'staticlib::compress::make_inflate_source(Source &source)']]], + ['make_5flzma_5fsink',['make_lzma_sink',['../namespacestaticlib_1_1compress.html#a0caa633139c3409483d5bf40c7fe9943',1,'staticlib::compress::make_lzma_sink(Sink &&sink)'],['../namespacestaticlib_1_1compress.html#a3a4c8f2606785eb797dc5cfc142163a4',1,'staticlib::compress::make_lzma_sink(Sink &sink)']]], + ['make_5flzma_5fsource',['make_lzma_source',['../namespacestaticlib_1_1compress.html#a3f730831b4fcabb17dd78c565147c496',1,'staticlib::compress::make_lzma_source(Source &&source)'],['../namespacestaticlib_1_1compress.html#aef8cd1bcf6be2d02b52eea48cc42126a',1,'staticlib::compress::make_lzma_source(Source &source)']]], + ['make_5fzip_5fsink',['make_zip_sink',['../namespacestaticlib_1_1compress.html#a1c72a1be1c543ed5667c92d4e5b4ec23',1,'staticlib::compress::make_zip_sink(Sink &&sink)'],['../namespacestaticlib_1_1compress.html#a9cbc64e3ca72400817edaf6d52c3e723',1,'staticlib::compress::make_zip_sink(Sink &sink)']]] +]; diff --git a/docs/html/search/all_6f.html b/docs/html/search/all_6f.html new file mode 100644 index 0000000..61827e8 --- /dev/null +++ b/docs/html/search/all_6f.html @@ -0,0 +1,25 @@ + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/all_6f.js b/docs/html/search/all_6f.js new file mode 100644 index 0000000..051d011 --- /dev/null +++ b/docs/html/search/all_6f.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['operator_3d',['operator=',['../classstaticlib_1_1compress_1_1deflate__sink.html#adfecf20df291b38a3eed0a57aaa0fdc2',1,'staticlib::compress::deflate_sink::operator=(const deflate_sink &)'],['../classstaticlib_1_1compress_1_1deflate__sink.html#a9353579e5fc2ecc9703e78d64284be4b',1,'staticlib::compress::deflate_sink::operator=(deflate_sink &&other)'],['../classstaticlib_1_1compress_1_1inflate__source.html#a914e9d239318e8df4a28b60ff9d70283',1,'staticlib::compress::inflate_source::operator=(const inflate_source &)'],['../classstaticlib_1_1compress_1_1inflate__source.html#a56fac76187720b2a78364ce2afa5cf28',1,'staticlib::compress::inflate_source::operator=(inflate_source &&other)'],['../classstaticlib_1_1compress_1_1lzma__sink.html#a080b4486d6ae6340f659acf5f324c897',1,'staticlib::compress::lzma_sink::operator=(const lzma_sink &)'],['../classstaticlib_1_1compress_1_1lzma__sink.html#a89bfb086c786f896d825e5aa9b0bbb0b',1,'staticlib::compress::lzma_sink::operator=(lzma_sink &&other)'],['../classstaticlib_1_1compress_1_1lzma__source.html#a9be23fabd20bd49975d036ef3faf2d59',1,'staticlib::compress::lzma_source::operator=(const lzma_source &)'],['../classstaticlib_1_1compress_1_1lzma__source.html#a690ee2787bea80c1c6c50a21e919ffab',1,'staticlib::compress::lzma_source::operator=(lzma_source &&other)'],['../classstaticlib_1_1compress_1_1zip__sink.html#a12e69d19583e68001fce4a3ac659df32',1,'staticlib::compress::zip_sink::operator=(const zip_sink &)'],['../classstaticlib_1_1compress_1_1zip__sink.html#a1b7edd3a97320d209d3459f6b6c1d6bf',1,'staticlib::compress::zip_sink::operator=(zip_sink &&other)']]] +]; diff --git a/docs/html/search/all_72.html b/docs/html/search/all_72.html new file mode 100644 index 0000000..0ab18d6 --- /dev/null +++ b/docs/html/search/all_72.html @@ -0,0 +1,25 @@ + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/all_72.js b/docs/html/search/all_72.js new file mode 100644 index 0000000..37816a1 --- /dev/null +++ b/docs/html/search/all_72.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['read',['read',['../classstaticlib_1_1compress_1_1inflate__source.html#ad2b61157ff421df50bfc5387548bce74',1,'staticlib::compress::inflate_source::read()'],['../classstaticlib_1_1compress_1_1lzma__source.html#a1ad0578f330660b3cfa1902b1f3a9df8',1,'staticlib::compress::lzma_source::read()']]] +]; diff --git a/docs/html/search/all_73.html b/docs/html/search/all_73.html new file mode 100644 index 0000000..1ec8f17 --- /dev/null +++ b/docs/html/search/all_73.html @@ -0,0 +1,25 @@ + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/all_73.js b/docs/html/search/all_73.js new file mode 100644 index 0000000..ed57ae0 --- /dev/null +++ b/docs/html/search/all_73.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['compress',['compress',['../namespacestaticlib_1_1compress.html',1,'staticlib']]], + ['detail',['detail',['../namespacestaticlib_1_1compress_1_1detail.html',1,'staticlib::compress']]], + ['staticlib',['staticlib',['../namespacestaticlib.html',1,'']]] +]; diff --git a/docs/html/search/all_77.html b/docs/html/search/all_77.html new file mode 100644 index 0000000..73323d3 --- /dev/null +++ b/docs/html/search/all_77.html @@ -0,0 +1,25 @@ + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/all_77.js b/docs/html/search/all_77.js new file mode 100644 index 0000000..c375da9 --- /dev/null +++ b/docs/html/search/all_77.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['write',['write',['../classstaticlib_1_1compress_1_1deflate__sink.html#ab2abf50f9fd5e540f328c9dfaa86b834',1,'staticlib::compress::deflate_sink::write()'],['../classstaticlib_1_1compress_1_1lzma__sink.html#a61e83f56d884e2b69da8e13f01abac1c',1,'staticlib::compress::lzma_sink::write()'],['../classstaticlib_1_1compress_1_1zip__sink.html#a4a01813da9a4228e9b5d03eedebfc20c',1,'staticlib::compress::zip_sink::write()']]], + ['write_5fcd_5ffile_5fheader',['write_cd_file_header',['../classstaticlib_1_1compress_1_1detail_1_1Header.html#a9f9d37eec6ed7d2a55dda62db0ecda77',1,'staticlib::compress::detail::Header']]], + ['write_5fdata_5fdescriptor',['write_data_descriptor',['../classstaticlib_1_1compress_1_1detail_1_1Header.html#adf98e1712ec003d082f42b09b95720fa',1,'staticlib::compress::detail::Header']]], + ['write_5feocd',['write_eocd',['../namespacestaticlib_1_1compress_1_1detail.html#a2cc275117eff81cdf547835dcf1d475c',1,'staticlib::compress::detail']]], + ['write_5flocal_5ffile_5fheader',['write_local_file_header',['../classstaticlib_1_1compress_1_1detail_1_1Header.html#a7592083445539ae922d1e9b984fa6a5f',1,'staticlib::compress::detail::Header']]] +]; diff --git a/docs/html/search/all_7a.html b/docs/html/search/all_7a.html new file mode 100644 index 0000000..0593a62 --- /dev/null +++ b/docs/html/search/all_7a.html @@ -0,0 +1,25 @@ + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/all_7a.js b/docs/html/search/all_7a.js new file mode 100644 index 0000000..b97646f --- /dev/null +++ b/docs/html/search/all_7a.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['zip_5fcompression_5fmethod',['zip_compression_method',['../namespacestaticlib_1_1compress.html#ab24229a25536a0cdf33126701557a143',1,'staticlib::compress']]], + ['zip_5fcompression_5fmethod_2ehpp',['zip_compression_method.hpp',['../zip__compression__method_8hpp.html',1,'']]], + ['zip_5fsink',['zip_sink',['../classstaticlib_1_1compress_1_1zip__sink.html#a96dc6fbbaf100440131abadbe332538f',1,'staticlib::compress::zip_sink::zip_sink(Sink &&sink)'],['../classstaticlib_1_1compress_1_1zip__sink.html#a98c28c07757b70a8dde3fabbadbab6e8',1,'staticlib::compress::zip_sink::zip_sink(const zip_sink &)'],['../classstaticlib_1_1compress_1_1zip__sink.html#a165bedd789505fc4fd58d7ecb9fc2b8c',1,'staticlib::compress::zip_sink::zip_sink(zip_sink &&other)']]], + ['zip_5fsink',['zip_sink',['../classstaticlib_1_1compress_1_1zip__sink.html',1,'staticlib::compress']]], + ['zip_5fsink_2ehpp',['zip_sink.hpp',['../zip__sink_8hpp.html',1,'']]] +]; diff --git a/docs/html/search/all_7e.html b/docs/html/search/all_7e.html new file mode 100644 index 0000000..63512c6 --- /dev/null +++ b/docs/html/search/all_7e.html @@ -0,0 +1,25 @@ + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/all_7e.js b/docs/html/search/all_7e.js new file mode 100644 index 0000000..c0fa49b --- /dev/null +++ b/docs/html/search/all_7e.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['_7ezip_5fsink',['~zip_sink',['../classstaticlib_1_1compress_1_1zip__sink.html#a225cd72fe72446c44d8a3e2cfbcc6df3',1,'staticlib::compress::zip_sink']]] +]; diff --git a/docs/html/search/classes_63.html b/docs/html/search/classes_63.html new file mode 100644 index 0000000..72c66b9 --- /dev/null +++ b/docs/html/search/classes_63.html @@ -0,0 +1,25 @@ + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/classes_63.js b/docs/html/search/classes_63.js new file mode 100644 index 0000000..6c9f245 --- /dev/null +++ b/docs/html/search/classes_63.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['compress_5fexception',['compress_exception',['../classstaticlib_1_1compress_1_1compress__exception.html',1,'staticlib::compress']]] +]; diff --git a/docs/html/search/classes_64.html b/docs/html/search/classes_64.html new file mode 100644 index 0000000..5902708 --- /dev/null +++ b/docs/html/search/classes_64.html @@ -0,0 +1,25 @@ + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/classes_64.js b/docs/html/search/classes_64.js new file mode 100644 index 0000000..94517cd --- /dev/null +++ b/docs/html/search/classes_64.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['deflate_5fsink',['deflate_sink',['../classstaticlib_1_1compress_1_1deflate__sink.html',1,'staticlib::compress']]] +]; diff --git a/docs/html/search/classes_68.html b/docs/html/search/classes_68.html new file mode 100644 index 0000000..475eeb7 --- /dev/null +++ b/docs/html/search/classes_68.html @@ -0,0 +1,25 @@ + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/classes_68.js b/docs/html/search/classes_68.js new file mode 100644 index 0000000..1ef55d2 --- /dev/null +++ b/docs/html/search/classes_68.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['header',['Header',['../classstaticlib_1_1compress_1_1detail_1_1Header.html',1,'staticlib::compress::detail']]] +]; diff --git a/docs/html/search/classes_69.html b/docs/html/search/classes_69.html new file mode 100644 index 0000000..961dbea --- /dev/null +++ b/docs/html/search/classes_69.html @@ -0,0 +1,25 @@ + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/classes_69.js b/docs/html/search/classes_69.js new file mode 100644 index 0000000..8b3ec50 --- /dev/null +++ b/docs/html/search/classes_69.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['inflate_5fsource',['inflate_source',['../classstaticlib_1_1compress_1_1inflate__source.html',1,'staticlib::compress']]] +]; diff --git a/docs/html/search/classes_6c.html b/docs/html/search/classes_6c.html new file mode 100644 index 0000000..9991e05 --- /dev/null +++ b/docs/html/search/classes_6c.html @@ -0,0 +1,25 @@ + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/classes_6c.js b/docs/html/search/classes_6c.js new file mode 100644 index 0000000..87318c9 --- /dev/null +++ b/docs/html/search/classes_6c.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['lzma_5fsink',['lzma_sink',['../classstaticlib_1_1compress_1_1lzma__sink.html',1,'staticlib::compress']]], + ['lzma_5fsource',['lzma_source',['../classstaticlib_1_1compress_1_1lzma__source.html',1,'staticlib::compress']]] +]; diff --git a/docs/html/search/classes_7a.html b/docs/html/search/classes_7a.html new file mode 100644 index 0000000..cb7881c --- /dev/null +++ b/docs/html/search/classes_7a.html @@ -0,0 +1,25 @@ + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/classes_7a.js b/docs/html/search/classes_7a.js new file mode 100644 index 0000000..90013c8 --- /dev/null +++ b/docs/html/search/classes_7a.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['zip_5fsink',['zip_sink',['../classstaticlib_1_1compress_1_1zip__sink.html',1,'staticlib::compress']]] +]; diff --git a/docs/html/search/close.png b/docs/html/search/close.png new file mode 100644 index 0000000..9342d3d Binary files /dev/null and b/docs/html/search/close.png differ diff --git a/docs/html/search/enums_7a.html b/docs/html/search/enums_7a.html new file mode 100644 index 0000000..751f760 --- /dev/null +++ b/docs/html/search/enums_7a.html @@ -0,0 +1,25 @@ + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/enums_7a.js b/docs/html/search/enums_7a.js new file mode 100644 index 0000000..db3692e --- /dev/null +++ b/docs/html/search/enums_7a.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['zip_5fcompression_5fmethod',['zip_compression_method',['../namespacestaticlib_1_1compress.html#ab24229a25536a0cdf33126701557a143',1,'staticlib::compress']]] +]; diff --git a/docs/html/search/files_63.html b/docs/html/search/files_63.html new file mode 100644 index 0000000..6611a5b --- /dev/null +++ b/docs/html/search/files_63.html @@ -0,0 +1,25 @@ + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/files_63.js b/docs/html/search/files_63.js new file mode 100644 index 0000000..a7700b9 --- /dev/null +++ b/docs/html/search/files_63.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['compress_2ehpp',['compress.hpp',['../compress_8hpp.html',1,'']]], + ['compress_5fexception_2ehpp',['compress_exception.hpp',['../compress__exception_8hpp.html',1,'']]] +]; diff --git a/docs/html/search/files_64.html b/docs/html/search/files_64.html new file mode 100644 index 0000000..1a32bf8 --- /dev/null +++ b/docs/html/search/files_64.html @@ -0,0 +1,25 @@ + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/files_64.js b/docs/html/search/files_64.js new file mode 100644 index 0000000..c203d36 --- /dev/null +++ b/docs/html/search/files_64.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['deflate_5fsink_2ehpp',['deflate_sink.hpp',['../deflate__sink_8hpp.html',1,'']]] +]; diff --git a/docs/html/search/files_69.html b/docs/html/search/files_69.html new file mode 100644 index 0000000..7fbd757 --- /dev/null +++ b/docs/html/search/files_69.html @@ -0,0 +1,25 @@ + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/files_69.js b/docs/html/search/files_69.js new file mode 100644 index 0000000..a50a64b --- /dev/null +++ b/docs/html/search/files_69.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['inflate_5fsource_2ehpp',['inflate_source.hpp',['../inflate__source_8hpp.html',1,'']]] +]; diff --git a/docs/html/search/files_6c.html b/docs/html/search/files_6c.html new file mode 100644 index 0000000..642a545 --- /dev/null +++ b/docs/html/search/files_6c.html @@ -0,0 +1,25 @@ + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/files_6c.js b/docs/html/search/files_6c.js new file mode 100644 index 0000000..b6a45c5 --- /dev/null +++ b/docs/html/search/files_6c.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['lzma_5fsink_2ehpp',['lzma_sink.hpp',['../lzma__sink_8hpp.html',1,'']]], + ['lzma_5fsource_2ehpp',['lzma_source.hpp',['../lzma__source_8hpp.html',1,'']]] +]; diff --git a/docs/html/search/files_7a.html b/docs/html/search/files_7a.html new file mode 100644 index 0000000..935d8fb --- /dev/null +++ b/docs/html/search/files_7a.html @@ -0,0 +1,25 @@ + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/files_7a.js b/docs/html/search/files_7a.js new file mode 100644 index 0000000..ae7dfd5 --- /dev/null +++ b/docs/html/search/files_7a.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['zip_5fcompression_5fmethod_2ehpp',['zip_compression_method.hpp',['../zip__compression__method_8hpp.html',1,'']]], + ['zip_5fsink_2ehpp',['zip_sink.hpp',['../zip__sink_8hpp.html',1,'']]] +]; diff --git a/docs/html/search/functions_61.html b/docs/html/search/functions_61.html new file mode 100644 index 0000000..7f39533 --- /dev/null +++ b/docs/html/search/functions_61.html @@ -0,0 +1,25 @@ + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/functions_61.js b/docs/html/search/functions_61.js new file mode 100644 index 0000000..ba0ceed --- /dev/null +++ b/docs/html/search/functions_61.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['add_5fentry',['add_entry',['../classstaticlib_1_1compress_1_1zip__sink.html#a6fa3cb668a97c510343d78539960d81b',1,'staticlib::compress::zip_sink']]] +]; diff --git a/docs/html/search/functions_63.html b/docs/html/search/functions_63.html new file mode 100644 index 0000000..9ebe11d --- /dev/null +++ b/docs/html/search/functions_63.html @@ -0,0 +1,25 @@ + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/functions_63.js b/docs/html/search/functions_63.js new file mode 100644 index 0000000..9377a3e --- /dev/null +++ b/docs/html/search/functions_63.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['compress_5fexception',['compress_exception',['../classstaticlib_1_1compress_1_1compress__exception.html#a45c8bce5c61c580bfbe4cc7af94854ab',1,'staticlib::compress::compress_exception::compress_exception()'],['../classstaticlib_1_1compress_1_1compress__exception.html#a34ca2a4b66bdb7a4066e9b5209fc0945',1,'staticlib::compress::compress_exception::compress_exception(const std::string &msg)']]] +]; diff --git a/docs/html/search/functions_64.html b/docs/html/search/functions_64.html new file mode 100644 index 0000000..d8b6394 --- /dev/null +++ b/docs/html/search/functions_64.html @@ -0,0 +1,25 @@ + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/functions_64.js b/docs/html/search/functions_64.js new file mode 100644 index 0000000..fd4d396 --- /dev/null +++ b/docs/html/search/functions_64.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['deflate_5fsink',['deflate_sink',['../classstaticlib_1_1compress_1_1deflate__sink.html#ab72cc778c23290c191e5a7dbb6af40d9',1,'staticlib::compress::deflate_sink::deflate_sink(Sink &&sink)'],['../classstaticlib_1_1compress_1_1deflate__sink.html#acff9beb5a8b0ecc7856df1d46aea6fd0',1,'staticlib::compress::deflate_sink::deflate_sink(deflate_sink &&other)']]] +]; diff --git a/docs/html/search/functions_66.html b/docs/html/search/functions_66.html new file mode 100644 index 0000000..319a531 --- /dev/null +++ b/docs/html/search/functions_66.html @@ -0,0 +1,25 @@ + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/functions_66.js b/docs/html/search/functions_66.js new file mode 100644 index 0000000..c35d918 --- /dev/null +++ b/docs/html/search/functions_66.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['finalize',['finalize',['../classstaticlib_1_1compress_1_1zip__sink.html#adefcbc44dbd06699dccfd132d434382c',1,'staticlib::compress::zip_sink']]], + ['flush',['flush',['../classstaticlib_1_1compress_1_1deflate__sink.html#af275839abaa826a02cb2875c7065c3ce',1,'staticlib::compress::deflate_sink::flush()'],['../classstaticlib_1_1compress_1_1lzma__sink.html#ad2c3072e8d6fa23b1f55a4123103785d',1,'staticlib::compress::lzma_sink::flush()'],['../classstaticlib_1_1compress_1_1zip__sink.html#ac25d9cc14c7703a57e6fd97a94f5e468',1,'staticlib::compress::zip_sink::flush()']]] +]; diff --git a/docs/html/search/functions_67.html b/docs/html/search/functions_67.html new file mode 100644 index 0000000..d0ab42a --- /dev/null +++ b/docs/html/search/functions_67.html @@ -0,0 +1,25 @@ + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/functions_67.js b/docs/html/search/functions_67.js new file mode 100644 index 0000000..9481774 --- /dev/null +++ b/docs/html/search/functions_67.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['get_5fsink',['get_sink',['../classstaticlib_1_1compress_1_1deflate__sink.html#a787936f54f5f1806d08e9c36f33880ef',1,'staticlib::compress::deflate_sink::get_sink()'],['../classstaticlib_1_1compress_1_1lzma__sink.html#a20d4947ce09005e607423ec66e3c1eb5',1,'staticlib::compress::lzma_sink::get_sink()']]], + ['get_5fsource',['get_source',['../classstaticlib_1_1compress_1_1inflate__source.html#a5e440021ae79930b072c3a3ee7cde57f',1,'staticlib::compress::inflate_source::get_source()'],['../classstaticlib_1_1compress_1_1lzma__source.html#af1fda27e7bc4713cab28aac0930441de',1,'staticlib::compress::lzma_source::get_source()']]] +]; diff --git a/docs/html/search/functions_68.html b/docs/html/search/functions_68.html new file mode 100644 index 0000000..66b85be --- /dev/null +++ b/docs/html/search/functions_68.html @@ -0,0 +1,25 @@ + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/functions_68.js b/docs/html/search/functions_68.js new file mode 100644 index 0000000..9cc0b2d --- /dev/null +++ b/docs/html/search/functions_68.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['header',['Header',['../classstaticlib_1_1compress_1_1detail_1_1Header.html#aa676866e402942a6f3243172876fc4c7',1,'staticlib::compress::detail::Header']]] +]; diff --git a/docs/html/search/functions_69.html b/docs/html/search/functions_69.html new file mode 100644 index 0000000..e204197 --- /dev/null +++ b/docs/html/search/functions_69.html @@ -0,0 +1,25 @@ + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/functions_69.js b/docs/html/search/functions_69.js new file mode 100644 index 0000000..62bbb53 --- /dev/null +++ b/docs/html/search/functions_69.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['inflate_5fsource',['inflate_source',['../classstaticlib_1_1compress_1_1inflate__source.html#affb9fda191369e292b8f2cffbdfd2d0d',1,'staticlib::compress::inflate_source::inflate_source(Source src)'],['../classstaticlib_1_1compress_1_1inflate__source.html#a5cea2c16bb71478c5423e508882052c9',1,'staticlib::compress::inflate_source::inflate_source(inflate_source &&other)']]] +]; diff --git a/docs/html/search/functions_6c.html b/docs/html/search/functions_6c.html new file mode 100644 index 0000000..da371cf --- /dev/null +++ b/docs/html/search/functions_6c.html @@ -0,0 +1,25 @@ + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/functions_6c.js b/docs/html/search/functions_6c.js new file mode 100644 index 0000000..a135027 --- /dev/null +++ b/docs/html/search/functions_6c.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['lzma_5fsink',['lzma_sink',['../classstaticlib_1_1compress_1_1lzma__sink.html#a1647ec6a16cc61547b9d03c538113583',1,'staticlib::compress::lzma_sink::lzma_sink(Sink &&sink)'],['../classstaticlib_1_1compress_1_1lzma__sink.html#a5e82d459fe6ee090c3afbb61bcf91355',1,'staticlib::compress::lzma_sink::lzma_sink(lzma_sink &&other)']]], + ['lzma_5fsource',['lzma_source',['../classstaticlib_1_1compress_1_1lzma__source.html#ac31c107818ba17b6cc351f8349cd7c31',1,'staticlib::compress::lzma_source::lzma_source(Source src)'],['../classstaticlib_1_1compress_1_1lzma__source.html#ab6d6c084807be051e1d1b881cd22df1c',1,'staticlib::compress::lzma_source::lzma_source(lzma_source &&other)']]] +]; diff --git a/docs/html/search/functions_6d.html b/docs/html/search/functions_6d.html new file mode 100644 index 0000000..d01ac53 --- /dev/null +++ b/docs/html/search/functions_6d.html @@ -0,0 +1,25 @@ + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/functions_6d.js b/docs/html/search/functions_6d.js new file mode 100644 index 0000000..204d47b --- /dev/null +++ b/docs/html/search/functions_6d.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['make_5fdeflate_5fsink',['make_deflate_sink',['../namespacestaticlib_1_1compress.html#a63933c16dc60842b23c6267abe613d9b',1,'staticlib::compress::make_deflate_sink(Sink &&sink)'],['../namespacestaticlib_1_1compress.html#a8c012c84202eeb797564b11ab696dc4d',1,'staticlib::compress::make_deflate_sink(Sink &sink)']]], + ['make_5finflate_5fsource',['make_inflate_source',['../namespacestaticlib_1_1compress.html#a4fb912eee368198b7aa2d942d155a082',1,'staticlib::compress::make_inflate_source(Source &&source)'],['../namespacestaticlib_1_1compress.html#a2ecd78d6a52acab599d52ed75b0a9774',1,'staticlib::compress::make_inflate_source(Source &source)']]], + ['make_5flzma_5fsink',['make_lzma_sink',['../namespacestaticlib_1_1compress.html#a0caa633139c3409483d5bf40c7fe9943',1,'staticlib::compress::make_lzma_sink(Sink &&sink)'],['../namespacestaticlib_1_1compress.html#a3a4c8f2606785eb797dc5cfc142163a4',1,'staticlib::compress::make_lzma_sink(Sink &sink)']]], + ['make_5flzma_5fsource',['make_lzma_source',['../namespacestaticlib_1_1compress.html#a3f730831b4fcabb17dd78c565147c496',1,'staticlib::compress::make_lzma_source(Source &&source)'],['../namespacestaticlib_1_1compress.html#aef8cd1bcf6be2d02b52eea48cc42126a',1,'staticlib::compress::make_lzma_source(Source &source)']]], + ['make_5fzip_5fsink',['make_zip_sink',['../namespacestaticlib_1_1compress.html#a1c72a1be1c543ed5667c92d4e5b4ec23',1,'staticlib::compress::make_zip_sink(Sink &&sink)'],['../namespacestaticlib_1_1compress.html#a9cbc64e3ca72400817edaf6d52c3e723',1,'staticlib::compress::make_zip_sink(Sink &sink)']]] +]; diff --git a/docs/html/search/functions_6f.html b/docs/html/search/functions_6f.html new file mode 100644 index 0000000..222f0f8 --- /dev/null +++ b/docs/html/search/functions_6f.html @@ -0,0 +1,25 @@ + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/functions_6f.js b/docs/html/search/functions_6f.js new file mode 100644 index 0000000..051d011 --- /dev/null +++ b/docs/html/search/functions_6f.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['operator_3d',['operator=',['../classstaticlib_1_1compress_1_1deflate__sink.html#adfecf20df291b38a3eed0a57aaa0fdc2',1,'staticlib::compress::deflate_sink::operator=(const deflate_sink &)'],['../classstaticlib_1_1compress_1_1deflate__sink.html#a9353579e5fc2ecc9703e78d64284be4b',1,'staticlib::compress::deflate_sink::operator=(deflate_sink &&other)'],['../classstaticlib_1_1compress_1_1inflate__source.html#a914e9d239318e8df4a28b60ff9d70283',1,'staticlib::compress::inflate_source::operator=(const inflate_source &)'],['../classstaticlib_1_1compress_1_1inflate__source.html#a56fac76187720b2a78364ce2afa5cf28',1,'staticlib::compress::inflate_source::operator=(inflate_source &&other)'],['../classstaticlib_1_1compress_1_1lzma__sink.html#a080b4486d6ae6340f659acf5f324c897',1,'staticlib::compress::lzma_sink::operator=(const lzma_sink &)'],['../classstaticlib_1_1compress_1_1lzma__sink.html#a89bfb086c786f896d825e5aa9b0bbb0b',1,'staticlib::compress::lzma_sink::operator=(lzma_sink &&other)'],['../classstaticlib_1_1compress_1_1lzma__source.html#a9be23fabd20bd49975d036ef3faf2d59',1,'staticlib::compress::lzma_source::operator=(const lzma_source &)'],['../classstaticlib_1_1compress_1_1lzma__source.html#a690ee2787bea80c1c6c50a21e919ffab',1,'staticlib::compress::lzma_source::operator=(lzma_source &&other)'],['../classstaticlib_1_1compress_1_1zip__sink.html#a12e69d19583e68001fce4a3ac659df32',1,'staticlib::compress::zip_sink::operator=(const zip_sink &)'],['../classstaticlib_1_1compress_1_1zip__sink.html#a1b7edd3a97320d209d3459f6b6c1d6bf',1,'staticlib::compress::zip_sink::operator=(zip_sink &&other)']]] +]; diff --git a/docs/html/search/functions_72.html b/docs/html/search/functions_72.html new file mode 100644 index 0000000..a4336f7 --- /dev/null +++ b/docs/html/search/functions_72.html @@ -0,0 +1,25 @@ + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/functions_72.js b/docs/html/search/functions_72.js new file mode 100644 index 0000000..37816a1 --- /dev/null +++ b/docs/html/search/functions_72.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['read',['read',['../classstaticlib_1_1compress_1_1inflate__source.html#ad2b61157ff421df50bfc5387548bce74',1,'staticlib::compress::inflate_source::read()'],['../classstaticlib_1_1compress_1_1lzma__source.html#a1ad0578f330660b3cfa1902b1f3a9df8',1,'staticlib::compress::lzma_source::read()']]] +]; diff --git a/docs/html/search/functions_77.html b/docs/html/search/functions_77.html new file mode 100644 index 0000000..8fe9755 --- /dev/null +++ b/docs/html/search/functions_77.html @@ -0,0 +1,25 @@ + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/functions_77.js b/docs/html/search/functions_77.js new file mode 100644 index 0000000..c375da9 --- /dev/null +++ b/docs/html/search/functions_77.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['write',['write',['../classstaticlib_1_1compress_1_1deflate__sink.html#ab2abf50f9fd5e540f328c9dfaa86b834',1,'staticlib::compress::deflate_sink::write()'],['../classstaticlib_1_1compress_1_1lzma__sink.html#a61e83f56d884e2b69da8e13f01abac1c',1,'staticlib::compress::lzma_sink::write()'],['../classstaticlib_1_1compress_1_1zip__sink.html#a4a01813da9a4228e9b5d03eedebfc20c',1,'staticlib::compress::zip_sink::write()']]], + ['write_5fcd_5ffile_5fheader',['write_cd_file_header',['../classstaticlib_1_1compress_1_1detail_1_1Header.html#a9f9d37eec6ed7d2a55dda62db0ecda77',1,'staticlib::compress::detail::Header']]], + ['write_5fdata_5fdescriptor',['write_data_descriptor',['../classstaticlib_1_1compress_1_1detail_1_1Header.html#adf98e1712ec003d082f42b09b95720fa',1,'staticlib::compress::detail::Header']]], + ['write_5feocd',['write_eocd',['../namespacestaticlib_1_1compress_1_1detail.html#a2cc275117eff81cdf547835dcf1d475c',1,'staticlib::compress::detail']]], + ['write_5flocal_5ffile_5fheader',['write_local_file_header',['../classstaticlib_1_1compress_1_1detail_1_1Header.html#a7592083445539ae922d1e9b984fa6a5f',1,'staticlib::compress::detail::Header']]] +]; diff --git a/docs/html/search/functions_7a.html b/docs/html/search/functions_7a.html new file mode 100644 index 0000000..c134771 --- /dev/null +++ b/docs/html/search/functions_7a.html @@ -0,0 +1,25 @@ + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/functions_7a.js b/docs/html/search/functions_7a.js new file mode 100644 index 0000000..73d9d89 --- /dev/null +++ b/docs/html/search/functions_7a.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['zip_5fsink',['zip_sink',['../classstaticlib_1_1compress_1_1zip__sink.html#a96dc6fbbaf100440131abadbe332538f',1,'staticlib::compress::zip_sink::zip_sink(Sink &&sink)'],['../classstaticlib_1_1compress_1_1zip__sink.html#a98c28c07757b70a8dde3fabbadbab6e8',1,'staticlib::compress::zip_sink::zip_sink(const zip_sink &)'],['../classstaticlib_1_1compress_1_1zip__sink.html#a165bedd789505fc4fd58d7ecb9fc2b8c',1,'staticlib::compress::zip_sink::zip_sink(zip_sink &&other)']]] +]; diff --git a/docs/html/search/functions_7e.html b/docs/html/search/functions_7e.html new file mode 100644 index 0000000..fd1d3ce --- /dev/null +++ b/docs/html/search/functions_7e.html @@ -0,0 +1,25 @@ + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/functions_7e.js b/docs/html/search/functions_7e.js new file mode 100644 index 0000000..c0fa49b --- /dev/null +++ b/docs/html/search/functions_7e.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['_7ezip_5fsink',['~zip_sink',['../classstaticlib_1_1compress_1_1zip__sink.html#a225cd72fe72446c44d8a3e2cfbcc6df3',1,'staticlib::compress::zip_sink']]] +]; diff --git a/docs/html/search/mag_sel.png b/docs/html/search/mag_sel.png new file mode 100644 index 0000000..81f6040 Binary files /dev/null and b/docs/html/search/mag_sel.png differ diff --git a/docs/html/search/namespaces_73.html b/docs/html/search/namespaces_73.html new file mode 100644 index 0000000..5ebf8e4 --- /dev/null +++ b/docs/html/search/namespaces_73.html @@ -0,0 +1,25 @@ + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/namespaces_73.js b/docs/html/search/namespaces_73.js new file mode 100644 index 0000000..ed57ae0 --- /dev/null +++ b/docs/html/search/namespaces_73.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['compress',['compress',['../namespacestaticlib_1_1compress.html',1,'staticlib']]], + ['detail',['detail',['../namespacestaticlib_1_1compress_1_1detail.html',1,'staticlib::compress']]], + ['staticlib',['staticlib',['../namespacestaticlib.html',1,'']]] +]; diff --git a/docs/html/search/nomatches.html b/docs/html/search/nomatches.html new file mode 100644 index 0000000..b1ded27 --- /dev/null +++ b/docs/html/search/nomatches.html @@ -0,0 +1,12 @@ + + + + + + + +
+
No Matches
+
+ + diff --git a/docs/html/search/search.css b/docs/html/search/search.css new file mode 100644 index 0000000..d18c1da --- /dev/null +++ b/docs/html/search/search.css @@ -0,0 +1,238 @@ +/*---------------- Search Box */ + +#FSearchBox { + float: left; +} + +#MSearchBox { + white-space : nowrap; + position: absolute; + float: none; + display: inline; + margin-top: 8px; + right: 0px; + width: 170px; + z-index: 102; + background-color: white; +} + +#MSearchBox .left +{ + display:block; + position:absolute; + left:10px; + width:20px; + height:19px; + background:url('search_l.png') no-repeat; + background-position:right; +} + +#MSearchSelect { + display:block; + position:absolute; + width:20px; + height:19px; +} + +.left #MSearchSelect { + left:4px; +} + +.right #MSearchSelect { + right:5px; +} + +#MSearchField { + display:block; + position:absolute; + height:19px; + background:url('search_m.png') repeat-x; + border:none; + width:116px; + margin-left:20px; + padding-left:4px; + color: #909090; + outline: none; + font: 9pt Arial, Verdana, sans-serif; +} + +#FSearchBox #MSearchField { + margin-left:15px; +} + +#MSearchBox .right { + display:block; + position:absolute; + right:10px; + top:0px; + width:20px; + height:19px; + background:url('search_r.png') no-repeat; + background-position:left; +} + +#MSearchClose { + display: none; + position: absolute; + top: 4px; + background : none; + border: none; + margin: 0px 4px 0px 0px; + padding: 0px 0px; + outline: none; +} + +.left #MSearchClose { + left: 6px; +} + +.right #MSearchClose { + right: 2px; +} + +.MSearchBoxActive #MSearchField { + color: #000000; +} + +/*---------------- Search filter selection */ + +#MSearchSelectWindow { + display: none; + position: absolute; + left: 0; top: 0; + border: 1px solid #90A5CE; + background-color: #F9FAFC; + z-index: 1; + padding-top: 4px; + padding-bottom: 4px; + -moz-border-radius: 4px; + -webkit-border-top-left-radius: 4px; + -webkit-border-top-right-radius: 4px; + -webkit-border-bottom-left-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); +} + +.SelectItem { + font: 8pt Arial, Verdana, sans-serif; + padding-left: 2px; + padding-right: 12px; + border: 0px; +} + +span.SelectionMark { + margin-right: 4px; + font-family: monospace; + outline-style: none; + text-decoration: none; +} + +a.SelectItem { + display: block; + outline-style: none; + color: #000000; + text-decoration: none; + padding-left: 6px; + padding-right: 12px; +} + +a.SelectItem:focus, +a.SelectItem:active { + color: #000000; + outline-style: none; + text-decoration: none; +} + +a.SelectItem:hover { + color: #FFFFFF; + background-color: #3D578C; + outline-style: none; + text-decoration: none; + cursor: pointer; + display: block; +} + +/*---------------- Search results window */ + +iframe#MSearchResults { + width: 60ex; + height: 15em; +} + +#MSearchResultsWindow { + display: none; + position: absolute; + left: 0; top: 0; + border: 1px solid #000; + background-color: #EEF1F7; +} + +/* ----------------------------------- */ + + +#SRIndex { + clear:both; + padding-bottom: 15px; +} + +.SREntry { + font-size: 10pt; + padding-left: 1ex; +} + +.SRPage .SREntry { + font-size: 8pt; + padding: 1px 5px; +} + +body.SRPage { + margin: 5px 2px; +} + +.SRChildren { + padding-left: 3ex; padding-bottom: .5em +} + +.SRPage .SRChildren { + display: none; +} + +.SRSymbol { + font-weight: bold; + color: #425E97; + font-family: Arial, Verdana, sans-serif; + text-decoration: none; + outline: none; +} + +a.SRScope { + display: block; + color: #425E97; + font-family: Arial, Verdana, sans-serif; + text-decoration: none; + outline: none; +} + +a.SRSymbol:focus, a.SRSymbol:active, +a.SRScope:focus, a.SRScope:active { + text-decoration: underline; +} + +span.SRScope { + padding-left: 4px; +} + +.SRPage .SRStatus { + padding: 2px 5px; + font-size: 8pt; + font-style: italic; +} + +.SRResult { + display: none; +} + +DIV.searchresults { + margin-left: 10px; + margin-right: 10px; +} diff --git a/docs/html/search/search.js b/docs/html/search/search.js new file mode 100644 index 0000000..cc16e14 --- /dev/null +++ b/docs/html/search/search.js @@ -0,0 +1,805 @@ +// Search script generated by doxygen +// Copyright (C) 2009 by Dimitri van Heesch. + +// The code in this file is loosly based on main.js, part of Natural Docs, +// which is Copyright (C) 2003-2008 Greg Valure +// Natural Docs is licensed under the GPL. + +var indexSectionsWithContent = +{ + 0: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000101101111001101001100010010001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + 1: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001100011001000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + 2: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + 3: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001100001001000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + 4: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000101101111001101001000010010001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + 5: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" +}; + +var indexSectionNames = +{ + 0: "all", + 1: "classes", + 2: "namespaces", + 3: "files", + 4: "functions", + 5: "enums" +}; + +function convertToId(search) +{ + var result = ''; + for (i=0;i do a search + { + this.Search(); + } + } + + this.OnSearchSelectKey = function(evt) + { + var e = (evt) ? evt : window.event; // for IE + if (e.keyCode==40 && this.searchIndex0) // Up + { + this.searchIndex--; + this.OnSelectItem(this.searchIndex); + } + else if (e.keyCode==13 || e.keyCode==27) + { + this.OnSelectItem(this.searchIndex); + this.CloseSelectionWindow(); + this.DOMSearchField().focus(); + } + return false; + } + + // --------- Actions + + // Closes the results window. + this.CloseResultsWindow = function() + { + this.DOMPopupSearchResultsWindow().style.display = 'none'; + this.DOMSearchClose().style.display = 'none'; + this.Activate(false); + } + + this.CloseSelectionWindow = function() + { + this.DOMSearchSelectWindow().style.display = 'none'; + } + + // Performs a search. + this.Search = function() + { + this.keyTimeout = 0; + + // strip leading whitespace + var searchValue = this.DOMSearchField().value.replace(/^ +/, ""); + + var code = searchValue.toLowerCase().charCodeAt(0); + var hexCode; + if (code<16) + { + hexCode="0"+code.toString(16); + } + else + { + hexCode=code.toString(16); + } + + var resultsPage; + var resultsPageWithSearch; + var hasResultsPage; + + if (indexSectionsWithContent[this.searchIndex].charAt(code) == '1') + { + resultsPage = this.resultsPath + '/' + indexSectionNames[this.searchIndex] + '_' + hexCode + '.html'; + resultsPageWithSearch = resultsPage+'?'+escape(searchValue); + hasResultsPage = true; + } + else // nothing available for this search term + { + resultsPage = this.resultsPath + '/nomatches.html'; + resultsPageWithSearch = resultsPage; + hasResultsPage = false; + } + + window.frames.MSearchResults.location = resultsPageWithSearch; + var domPopupSearchResultsWindow = this.DOMPopupSearchResultsWindow(); + + if (domPopupSearchResultsWindow.style.display!='block') + { + var domSearchBox = this.DOMSearchBox(); + this.DOMSearchClose().style.display = 'inline'; + if (this.insideFrame) + { + var domPopupSearchResults = this.DOMPopupSearchResults(); + domPopupSearchResultsWindow.style.position = 'relative'; + domPopupSearchResultsWindow.style.display = 'block'; + var width = document.body.clientWidth - 8; // the -8 is for IE :-( + domPopupSearchResultsWindow.style.width = width + 'px'; + domPopupSearchResults.style.width = width + 'px'; + } + else + { + var domPopupSearchResults = this.DOMPopupSearchResults(); + var left = getXPos(domSearchBox) + 150; // domSearchBox.offsetWidth; + var top = getYPos(domSearchBox) + 20; // domSearchBox.offsetHeight + 1; + domPopupSearchResultsWindow.style.display = 'block'; + left -= domPopupSearchResults.offsetWidth; + domPopupSearchResultsWindow.style.top = top + 'px'; + domPopupSearchResultsWindow.style.left = left + 'px'; + } + } + + this.lastSearchValue = searchValue; + this.lastResultsPage = resultsPage; + } + + // -------- Activation Functions + + // Activates or deactivates the search panel, resetting things to + // their default values if necessary. + this.Activate = function(isActive) + { + if (isActive || // open it + this.DOMPopupSearchResultsWindow().style.display == 'block' + ) + { + this.DOMSearchBox().className = 'MSearchBoxActive'; + + var searchField = this.DOMSearchField(); + + if (searchField.value == this.searchLabel) // clear "Search" term upon entry + { + searchField.value = ''; + this.searchActive = true; + } + } + else if (!isActive) // directly remove the panel + { + this.DOMSearchBox().className = 'MSearchBoxInactive'; + this.DOMSearchField().value = this.searchLabel; + this.searchActive = false; + this.lastSearchValue = '' + this.lastResultsPage = ''; + } + } +} + +// ----------------------------------------------------------------------- + +// The class that handles everything on the search results page. +function SearchResults(name) +{ + // The number of matches from the last run of . + this.lastMatchCount = 0; + this.lastKey = 0; + this.repeatOn = false; + + // Toggles the visibility of the passed element ID. + this.FindChildElement = function(id) + { + var parentElement = document.getElementById(id); + var element = parentElement.firstChild; + + while (element && element!=parentElement) + { + if (element.nodeName == 'DIV' && element.className == 'SRChildren') + { + return element; + } + + if (element.nodeName == 'DIV' && element.hasChildNodes()) + { + element = element.firstChild; + } + else if (element.nextSibling) + { + element = element.nextSibling; + } + else + { + do + { + element = element.parentNode; + } + while (element && element!=parentElement && !element.nextSibling); + + if (element && element!=parentElement) + { + element = element.nextSibling; + } + } + } + } + + this.Toggle = function(id) + { + var element = this.FindChildElement(id); + if (element) + { + if (element.style.display == 'block') + { + element.style.display = 'none'; + } + else + { + element.style.display = 'block'; + } + } + } + + // Searches for the passed string. If there is no parameter, + // it takes it from the URL query. + // + // Always returns true, since other documents may try to call it + // and that may or may not be possible. + this.Search = function(search) + { + if (!search) // get search word from URL + { + search = window.location.search; + search = search.substring(1); // Remove the leading '?' + search = unescape(search); + } + + search = search.replace(/^ +/, ""); // strip leading spaces + search = search.replace(/ +$/, ""); // strip trailing spaces + search = search.toLowerCase(); + search = convertToId(search); + + var resultRows = document.getElementsByTagName("div"); + var matches = 0; + + var i = 0; + while (i < resultRows.length) + { + var row = resultRows.item(i); + if (row.className == "SRResult") + { + var rowMatchName = row.id.toLowerCase(); + rowMatchName = rowMatchName.replace(/^sr\d*_/, ''); // strip 'sr123_' + + if (search.length<=rowMatchName.length && + rowMatchName.substr(0, search.length)==search) + { + row.style.display = 'block'; + matches++; + } + else + { + row.style.display = 'none'; + } + } + i++; + } + document.getElementById("Searching").style.display='none'; + if (matches == 0) // no results + { + document.getElementById("NoMatches").style.display='block'; + } + else // at least one result + { + document.getElementById("NoMatches").style.display='none'; + } + this.lastMatchCount = matches; + return true; + } + + // return the first item with index index or higher that is visible + this.NavNext = function(index) + { + var focusItem; + while (1) + { + var focusName = 'Item'+index; + focusItem = document.getElementById(focusName); + if (focusItem && focusItem.parentNode.parentNode.style.display=='block') + { + break; + } + else if (!focusItem) // last element + { + break; + } + focusItem=null; + index++; + } + return focusItem; + } + + this.NavPrev = function(index) + { + var focusItem; + while (1) + { + var focusName = 'Item'+index; + focusItem = document.getElementById(focusName); + if (focusItem && focusItem.parentNode.parentNode.style.display=='block') + { + break; + } + else if (!focusItem) // last element + { + break; + } + focusItem=null; + index--; + } + return focusItem; + } + + this.ProcessKeys = function(e) + { + if (e.type == "keydown") + { + this.repeatOn = false; + this.lastKey = e.keyCode; + } + else if (e.type == "keypress") + { + if (!this.repeatOn) + { + if (this.lastKey) this.repeatOn = true; + return false; // ignore first keypress after keydown + } + } + else if (e.type == "keyup") + { + this.lastKey = 0; + this.repeatOn = false; + } + return this.lastKey!=0; + } + + this.Nav = function(evt,itemIndex) + { + var e = (evt) ? evt : window.event; // for IE + if (e.keyCode==13) return true; + if (!this.ProcessKeys(e)) return false; + + if (this.lastKey==38) // Up + { + var newIndex = itemIndex-1; + var focusItem = this.NavPrev(newIndex); + if (focusItem) + { + var child = this.FindChildElement(focusItem.parentNode.parentNode.id); + if (child && child.style.display == 'block') // children visible + { + var n=0; + var tmpElem; + while (1) // search for last child + { + tmpElem = document.getElementById('Item'+newIndex+'_c'+n); + if (tmpElem) + { + focusItem = tmpElem; + } + else // found it! + { + break; + } + n++; + } + } + } + if (focusItem) + { + focusItem.focus(); + } + else // return focus to search field + { + parent.document.getElementById("MSearchField").focus(); + } + } + else if (this.lastKey==40) // Down + { + var newIndex = itemIndex+1; + var focusItem; + var item = document.getElementById('Item'+itemIndex); + var elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem && elem.style.display == 'block') // children visible + { + focusItem = document.getElementById('Item'+itemIndex+'_c0'); + } + if (!focusItem) focusItem = this.NavNext(newIndex); + if (focusItem) focusItem.focus(); + } + else if (this.lastKey==39) // Right + { + var item = document.getElementById('Item'+itemIndex); + var elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem) elem.style.display = 'block'; + } + else if (this.lastKey==37) // Left + { + var item = document.getElementById('Item'+itemIndex); + var elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem) elem.style.display = 'none'; + } + else if (this.lastKey==27) // Escape + { + parent.searchBox.CloseResultsWindow(); + parent.document.getElementById("MSearchField").focus(); + } + else if (this.lastKey==13) // Enter + { + return true; + } + return false; + } + + this.NavChild = function(evt,itemIndex,childIndex) + { + var e = (evt) ? evt : window.event; // for IE + if (e.keyCode==13) return true; + if (!this.ProcessKeys(e)) return false; + + if (this.lastKey==38) // Up + { + if (childIndex>0) + { + var newIndex = childIndex-1; + document.getElementById('Item'+itemIndex+'_c'+newIndex).focus(); + } + else // already at first child, jump to parent + { + document.getElementById('Item'+itemIndex).focus(); + } + } + else if (this.lastKey==40) // Down + { + var newIndex = childIndex+1; + var elem = document.getElementById('Item'+itemIndex+'_c'+newIndex); + if (!elem) // last child, jump to parent next parent + { + elem = this.NavNext(itemIndex+1); + } + if (elem) + { + elem.focus(); + } + } + else if (this.lastKey==27) // Escape + { + parent.searchBox.CloseResultsWindow(); + parent.document.getElementById("MSearchField").focus(); + } + else if (this.lastKey==13) // Enter + { + return true; + } + return false; + } +} + +function setKeyActions(elem,action) +{ + elem.setAttribute('onkeydown',action); + elem.setAttribute('onkeypress',action); + elem.setAttribute('onkeyup',action); +} + +function setClassAttr(elem,attr) +{ + elem.setAttribute('class',attr); + elem.setAttribute('className',attr); +} + +function createResults() +{ + var results = document.getElementById("SRResults"); + for (var e=0; e + + + + +staticlib_compress: staticlib/compress/zip_compression_method.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
staticlib_compress +  1.2.0 +
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
zip_compression_method.hpp File Reference
+
+
+
#include <cstdint>
+
+

Go to the source code of this file.

+ + + + +

+Namespaces

namespace  staticlib
namespace  staticlib::compress
+ + +

+Enumerations

enum  staticlib::compress::zip_compression_method
+
+ + + + diff --git a/docs/html/zip__compression__method_8hpp_source.html b/docs/html/zip__compression__method_8hpp_source.html new file mode 100644 index 0000000..0a60cc6 --- /dev/null +++ b/docs/html/zip__compression__method_8hpp_source.html @@ -0,0 +1,140 @@ + + + + + +staticlib_compress: staticlib/compress/zip_compression_method.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
staticlib_compress +  1.2.0 +
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
zip_compression_method.hpp
+
+
+Go to the documentation of this file.
1 /*
+
2  * Copyright 2017, alex at staticlibs.net
+
3  *
+
4  * Licensed under the Apache License, Version 2.0 (the "License");
+
5  * you may not use this file except in compliance with the License.
+
6  * You may obtain a copy of the License at
+
7  *
+
8  * http://www.apache.org/licenses/LICENSE-2.0
+
9  *
+
10  * Unless required by applicable law or agreed to in writing, software
+
11  * distributed under the License is distributed on an "AS IS" BASIS,
+
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
13  * See the License for the specific language governing permissions and
+
14  * limitations under the License.
+
15  */
+
16 
+
17 /*
+
18  * File: zip_compression_method.hpp
+
19  * Author: alex
+
20  *
+
21  * Created on December 3, 2017, 5:14 PM
+
22  */
+
23 
+
24 #ifndef STATICLIB_COMPRESS_ZIP_COMPRESSION_METHOD_HPP
+
25 #define STATICLIB_COMPRESS_ZIP_COMPRESSION_METHOD_HPP
+
26 
+
27 #include <cstdint>
+
28 
+
29 namespace staticlib {
+
30 namespace compress {
+
31 
+
32  enum class zip_compression_method : uint16_t {
+
33  store = 0,
+
34  deflate = 0x8
+
35  };
+
36 
+
37 } // namespace
+
38 }
+
39 
+
40 #endif /* STATICLIB_COMPRESS_ZIP_COMPRESSION_METHOD_HPP */
+
41 
+
+ + + + diff --git a/docs/html/zip__sink_8hpp.html b/docs/html/zip__sink_8hpp.html new file mode 100644 index 0000000..35ed6f5 --- /dev/null +++ b/docs/html/zip__sink_8hpp.html @@ -0,0 +1,142 @@ + + + + + +staticlib_compress: staticlib/compress/zip_sink.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
staticlib_compress +  1.2.0 +
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
zip_sink.hpp File Reference
+
+
+
#include <ios>
+#include <memory>
+#include <string>
+#include <vector>
+#include "zlib.h"
+#include "staticlib/config.hpp"
+#include "staticlib/io.hpp"
+#include "staticlib/endian.hpp"
+#include "staticlib/compress/compress_exception.hpp"
+#include "staticlib/compress/deflate_sink.hpp"
+#include "staticlib/compress/zip_compression_method.hpp"
+
+

Go to the source code of this file.

+ + + + + + +

+Classes

class  staticlib::compress::detail::Header
 https://en.wikipedia.org/wiki/Zip_%28file_format%29 More...
class  staticlib::compress::zip_sink< Sink >
 Sink wrapper that creates ZIP archives, CRC sum and compression of entries is NOT supported. More...
+ + + + +

+Namespaces

namespace  staticlib
namespace  staticlib::compress
namespace  staticlib::compress::detail
+ + + + + + + + + +

+Functions

template<typename Sink >
void staticlib::compress::detail::write_eocd (Sink &sink, uint16_t files_count, uint32_t cd_offset, uint32_t cd_length)
template<typename Sink , class = typename std::enable_if<!std::is_lvalue_reference<Sink>::value>::type>
zip_sink< Sink > staticlib::compress::make_zip_sink (Sink &&sink)
 Factory function for creating zip sinks, created object will own the specified sink.
template<typename Sink >
zip_sink
+< sl::io::reference_sink< Sink > > 
staticlib::compress::make_zip_sink (Sink &sink)
 Factory function for creating zip sinks, created object will NOT own the specified sink.
+
+ + + + diff --git a/docs/html/zip__sink_8hpp_source.html b/docs/html/zip__sink_8hpp_source.html new file mode 100644 index 0000000..6ba0737 --- /dev/null +++ b/docs/html/zip__sink_8hpp_source.html @@ -0,0 +1,402 @@ + + + + + +staticlib_compress: staticlib/compress/zip_sink.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
staticlib_compress +  1.2.0 +
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
zip_sink.hpp
+
+
+Go to the documentation of this file.
1 /*
+
2  * Copyright 2016, alex at staticlibs.net
+
3  *
+
4  * Licensed under the Apache License, Version 2.0 (the "License");
+
5  * you may not use this file except in compliance with the License.
+
6  * You may obtain a copy of the License at
+
7  *
+
8  * http://www.apache.org/licenses/LICENSE-2.0
+
9  *
+
10  * Unless required by applicable law or agreed to in writing, software
+
11  * distributed under the License is distributed on an "AS IS" BASIS,
+
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
13  * See the License for the specific language governing permissions and
+
14  * limitations under the License.
+
15  */
+
16 
+
17 /*
+
18  * File: zip_sink.hpp
+
19  * Author: alex
+
20  *
+
21  * Created on February 13, 2016, 5:30 PM
+
22  */
+
23 
+
24 #ifndef STATICLIB_COMPRESS_ZIP_SINK_HPP
+
25 #define STATICLIB_COMPRESS_ZIP_SINK_HPP
+
26 
+
27 #include <ios>
+
28 #include <memory>
+
29 #include <string>
+
30 #include <vector>
+
31 
+
32 #include "zlib.h"
+
33 
+
34 #include "staticlib/config.hpp"
+
35 #include "staticlib/io.hpp"
+
36 #include "staticlib/endian.hpp"
+
37 
+ + + +
41 
+
42 namespace staticlib {
+
43 namespace compress {
+
44 
+
45 namespace detail {
+
46 
+
50 class Header {
+
51  std::string filename;
+
52  uint16_t compression_method;
+
53 
+
54  uint32_t offset = 0;
+
55  uint32_t compressed_size = 0;
+
56  uint32_t uncompressed_size = 0;
+
57  uint32_t crc = 0;
+
58 
+
59 public:
+
60 
+
61  Header(std::string filename, uint16_t compression_method) :
+
62  filename(std::move(filename)),
+
63  compression_method(compression_method) { }
+
64 
+
65  template <typename Sink>
+
66  void write_local_file_header(Sink& sink, uint32_t offset) {
+
67  namespace en = staticlib::endian;
+
68  // Local file header signature
+
69  en::write_32_le(sink, 0x04034b50);
+
70  // Version needed to extract (minimum)
+
71  en::write_16_le(sink, 10);
+
72  // General purpose bit flag
+
73  en::write_16_le(sink, 8);
+
74  // Compression method
+
75  en::write_16_le(sink, compression_method);
+
76  // File last modification time
+
77  en::write_16_le(sink, 0);
+
78  // File last modification date
+
79  en::write_16_le(sink, 0);
+
80  // CRC-32
+
81  en::write_32_le(sink, 0);
+
82  // Compressed size
+
83  en::write_32_le(sink, 0);
+
84  // Uncompressed size
+
85  en::write_32_le(sink, 0);
+
86  // File name length (n)
+
87  en::write_16_le(sink, filename.length());
+
88  // Extra field length (m)
+
89  en::write_16_le(sink, 0);
+
90  // File name
+
91  io::write_all(sink, {filename.data(), filename.length()});
+
92  // save offset for CD
+
93  this->offset = offset;
+
94  }
+
95 
+
96  template <typename Sink>
+
97  void write_data_descriptor(Sink& sink, uint32_t compressed_size, uint32_t uncompressed_size, uint32_t crc) {
+
98  namespace en = staticlib::endian;
+
99  // Optional data descriptor signature
+
100  en::write_32_le(sink, 0x08074b50);
+
101  // CRC-32
+
102  en::write_32_le(sink, crc);
+
103  // Compressed size
+
104  en::write_32_le(sink, compressed_size);
+
105  // Uncompressed size
+
106  en::write_32_le(sink, uncompressed_size);
+
107  // save sizes for CD
+
108  this->compressed_size = compressed_size;
+
109  this->uncompressed_size = uncompressed_size;
+
110  // save crc for CD
+
111  this->crc = crc;
+
112  }
+
113 
+
114  template <typename Sink>
+
115  void write_cd_file_header(Sink& sink) {
+
116  namespace en = staticlib::endian;
+
117  // Central directory file header signature
+
118  en::write_32_le(sink, 0x02014b50);
+
119  // Version made by
+
120  en::write_16_le(sink, 10);
+
121  // Version needed to extract (minimum)
+
122  en::write_16_le(sink, 10);
+
123  // General purpose bit flag
+
124  en::write_16_le(sink, 8);
+
125  // Compression method
+
126  en::write_16_le(sink, compression_method);
+
127  // File last modification time
+
128  en::write_16_le(sink, 0);
+
129  // File last modification date
+
130  en::write_16_le(sink, 0);
+
131  // CRC-32
+
132  en::write_32_le(sink, crc);
+
133  // Compressed size
+
134  en::write_32_le(sink, compressed_size);
+
135  // Uncompressed size
+
136  en::write_32_le(sink, uncompressed_size);
+
137  // File name length (n)
+
138  en::write_16_le(sink, filename.length());
+
139  // Extra field length (m)
+
140  en::write_16_le(sink, 0);
+
141  // File comment length (k)
+
142  en::write_16_le(sink, 0);
+
143  // Disk number where file starts
+
144  en::write_16_le(sink, 0);
+
145  // Internal file attributes
+
146  en::write_16_le(sink, 0);
+
147  // External file attributes
+
148  en::write_32_le(sink, 0);
+
149  // Relative offset of local file header.
+
150  en::write_32_le(sink, offset);
+
151  // File name
+
152  io::write_all(sink, {filename.data(), filename.length()});
+
153  }
+
154 
+
155 };
+
156 
+
157 template <typename Sink>
+
158 void write_eocd(Sink& sink, uint16_t files_count, uint32_t cd_offset, uint32_t cd_length) {
+
159  namespace en = staticlib::endian;
+
160  // End of central directory signature
+
161  en::write_32_le(sink, 0x06054b50);
+
162  // Number of this disk
+
163  en::write_16_le(sink, 0);
+
164  // Disk where central directory starts
+
165  en::write_16_le(sink, 0);
+
166  // Number of central directory records on this disk
+
167  en::write_16_le(sink, files_count);
+
168  // Total number of central directory records
+
169  en::write_16_le(sink, files_count);
+
170  // Size of central directory (bytes)
+
171  en::write_32_le(sink, cd_length);
+
172  // Offset of start of central directory
+
173  en::write_32_le(sink, cd_offset);
+
174  // Comment length (n)
+
175  en::write_16_le(sink, 0);
+
176 }
+
177 
+
178 } // namespace
+
179 
+
184 template <typename Sink>
+
185 class zip_sink {
+
186 private:
+
187  // stream shortcuts
+
188  using sink_ref_type = sl::io::reference_sink<sl::io::counting_sink<Sink>>;
+
189  using entry_counter_ref_type = sl::io::reference_sink<sl::io::counting_sink<sink_ref_type>>;
+
190  using deflater_type = sl::io::counting_sink<deflate_sink<entry_counter_ref_type>>;
+
191 
+
195  zip_compression_method method = zip_compression_method::deflate;
+
196  sl::io::counting_sink<Sink> sink;
+
197  std::vector<detail::Header> headers;
+
198  bool cd_written = false;
+
199 
+
200  sl::io::counting_sink<sink_ref_type> entry_counter;
+
201  std::unique_ptr<deflater_type> entry_deflater;
+
202  uint32_t entry_crc = 0;
+
203 
+
204 public:
+
205 
+
211  zip_sink(Sink&& sink) :
+
212  sink(sl::io::make_counting_sink(std::move(sink))),
+
213  entry_counter(sl::io::make_counting_sink(this->sink)),
+
214  entry_deflater(nullptr) { }
+
215 
+
219  ~zip_sink() STATICLIB_NOEXCEPT {
+
220  try {
+
221  finalize();
+
222  } catch(...) {
+
223  // ignore
+
224  }
+
225  }
+
226 
+
232  zip_sink(const zip_sink&) = delete;
+
233 
+
240  zip_sink& operator=(const zip_sink&) = delete;
+
241 
+
247  zip_sink(zip_sink&& other) :
+
248  sink(std::move(other.sink)),
+
249  headers(std::move(other.headers)),
+
250  cd_written(other.cd_written),
+
251  entry_counter(std::move(other.entry_counter)),
+
252  entry_deflater(std::move(other.entry_deflater)),
+
253  entry_crc(other.entry_crc) { }
+
254 
+ +
262  sink = std::move(other.sink);
+
263  headers = std::move(other.headers);
+
264  cd_written = other.cd_written;
+
265  entry_counter = std::move(other.entry_counter);
+
266  entry_deflater = std::move(other.entry_deflater);
+
267  entry_crc = other.entry_crc;
+
268  return *this;
+
269  }
+
270 
+
277  std::streamsize write(sl::io::span<const char> span) {
+
278  if (nullptr != entry_deflater.get()) {
+
279  size_t count_before = entry_deflater->get_count();
+
280  entry_deflater->write(span);
+
281  size_t count = entry_deflater->get_count() - count_before;
+
282  this->entry_crc = ::crc32(entry_crc, reinterpret_cast<const Bytef*>(span.data()), static_cast<uInt>(count));
+
283  return static_cast<std::streamsize>(count);
+
284  } else {
+
285  throw compress_exception(TRACEMSG("Invalid ZIP sink state: add ZIP entry before writing the data"));
+
286  }
+
287  }
+
288 
+
294  std::streamsize flush() {
+
295  return sink.flush();
+
296  }
+
297 
+
303  void add_entry(const std::string& filename) {
+
304  if (filename.empty()) throw compress_exception(TRACEMSG("Invalid empty entry name specified"));
+
305  if (cd_written) throw new compress_exception(TRACEMSG(
+
306  "Invalid entry add attempt for finalized ZIP stream"));
+
307  if (headers.size() > 0) {
+
308  write_entry_data_descriptor();
+
309  }
+
310  // add new entry
+
311  headers.emplace_back(std::string(filename.data(), filename.length()), static_cast<uint16_t>(method));
+
312  headers.back().write_local_file_header(sink, static_cast<uint32_t>(sink.get_count()));
+
313  entry_deflater.reset(new sl::io::counting_sink<deflate_sink<entry_counter_ref_type>>(make_deflate_sink(entry_counter)));
+
314  entry_crc = ::crc32(0L, Z_NULL, 0);
+
315  }
+
316 
+
322  void finalize() {
+
323  if (!cd_written && headers.size() > 0) {
+
324  write_entry_data_descriptor();
+
325  uint32_t cd_offset = static_cast<uint32_t>(sink.get_count());
+
326  for (detail::Header& he : headers) {
+
327  he.write_cd_file_header(sink);
+
328  }
+
329  size_t cd_len = sink.get_count() - cd_offset;
+
330  detail::write_eocd(sink, static_cast<uint16_t>(headers.size()), cd_offset, static_cast<uint32_t>(cd_len));
+
331  cd_written = true;
+
332  }
+
333  }
+
334 
+
335 private:
+
336  void write_entry_data_descriptor() {
+
337  // get size and close current entry
+
338  uint32_t uncompressed_size = static_cast<uint32_t>(entry_deflater->get_count());
+
339  entry_deflater.reset(nullptr);
+
340  // get size and reset counter
+
341  uint32_t compressed_size = static_cast<uint32_t>(entry_counter.get_count());
+
342  entry_counter = sl::io::make_counting_sink(sink);
+
343  headers.back().write_data_descriptor(sink, compressed_size, uncompressed_size, entry_crc);
+
344  }
+
345 
+
346 };
+
347 
+
355 template <typename Sink,
+
356 class = typename std::enable_if<!std::is_lvalue_reference<Sink>::value>::type>
+ +
358  return zip_sink<Sink>(std::move(sink));
+
359 }
+
360 
+
368 template <typename Sink>
+ + +
371  sl::io::make_reference_sink(sink));
+
372 }
+
373 
+
374 } // namespace
+
375 }
+
376 
+
377 #endif /* STATICLIB_COMPRESS_ZIP_SINK_HPP */
+
378 
+
+ + + + diff --git a/include/staticlib/compress.hpp b/include/staticlib/compress.hpp deleted file mode 100644 index e9b0436..0000000 --- a/include/staticlib/compress.hpp +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2016, alex at staticlibs.net - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * File: compress.hpp - * Author: alex - * - * Created on February 4, 2016, 3:17 PM - */ - -#ifndef STATICLIB_COMPRESS_HPP -#define STATICLIB_COMPRESS_HPP - -#include "staticlib/config.hpp" - -#include "staticlib/compress/compress_exception.hpp" -#include "staticlib/compress/deflate_sink.hpp" -#include "staticlib/compress/inflate_source.hpp" -#ifdef STATCILIB_COMPRESS_ENABLE_XZ -#include "staticlib/compress/lzma_sink.hpp" -#include "staticlib/compress/lzma_source.hpp" -#endif // STATCILIB_COMPRESS_ENABLE_XZ -#include "staticlib/compress/zip_compression_method.hpp" -#include "staticlib/compress/zip_sink.hpp" - -#endif /* STATICLIB_COMPRESS_HPP */ - diff --git a/include/staticlib/compress/compress_exception.hpp b/include/staticlib/compress/compress_exception.hpp deleted file mode 100644 index f39696a..0000000 --- a/include/staticlib/compress/compress_exception.hpp +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright 2016, alex at staticlibs.net - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * File: compress_exception.hpp - * Author: alex - * - * Created on January 29, 2016, 10:19 PM - */ - -#ifndef STATICLIB_COMPRESS_COMPRESSEXCEPTION_HPP -#define STATICLIB_COMPRESS_COMPRESSEXCEPTION_HPP - -#include "staticlib/support/exception.hpp" - -namespace staticlib { -namespace compress { - -/** - * Exception that is thrown on compression/decompression error - */ -class compress_exception : public sl::support::exception { -public: - /** - * Default constructor - */ - compress_exception() = default; - - /** - * Constructor with message - * - * @param msg error message - */ - compress_exception(const std::string& msg) : - sl::support::exception(msg) { } - -}; - -} // namespace -} - -#endif /* STATICLIB_COMPRESS_COMPRESSEXCEPTION_HPP */ - diff --git a/include/staticlib/compress/deflate_sink.hpp b/include/staticlib/compress/deflate_sink.hpp deleted file mode 100644 index 140d9d9..0000000 --- a/include/staticlib/compress/deflate_sink.hpp +++ /dev/null @@ -1,244 +0,0 @@ -/* - * Copyright 2016, alex at staticlibs.net - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * File: deflate_sink.hpp - * Author: alex - * - * Created on January 29, 2016, 9:19 PM - */ - -#ifndef STATICLIB_COMPRESS_DEFLATE_SINK_HPP -#define STATICLIB_COMPRESS_DEFLATE_SINK_HPP - -#include -#include -#include -#include -#include - -#include "zlib.h" - -#include "staticlib/config.hpp" -#include "staticlib/io.hpp" -#include "staticlib/support.hpp" - -#include "staticlib/compress/compress_exception.hpp" - -namespace staticlib { -namespace compress { - -/** - * Sink wrapper that compressed written data using Deflate algorithm - */ -template -class deflate_sink { - /** - * Destination sink for the compressed data - */ - Sink sink; - /** - * Internal buffer - */ - std::array buf; - /** - * Zlib compressing stream - */ - z_stream* strm; - -public: - - /** - * Constructor - * - * @param sink destination to write compressed data into - */ - deflate_sink(Sink&& sink) : - sink(std::move(sink)), - strm([] { - z_stream* stream = static_cast (std::malloc(sizeof(z_stream))); - if (nullptr == stream) throw compress_exception(TRACEMSG( - "Error creating deflate stream: 'malloc' failed")); - std::memset(stream, 0, sizeof (z_stream)); - auto err = deflateInit2(stream, compression_level, Z_DEFLATED, -MAX_WBITS, 8, Z_DEFAULT_STRATEGY); - if (Z_OK != err) throw compress_exception(TRACEMSG( - "Error initializing deflate stream: [" + ::zError(err) + "]")); - return stream; - }()) { } - - ~deflate_sink() STATICLIB_NOEXCEPT { - if (nullptr == strm) return; - auto deferred = sl::support::defer([this]() STATICLIB_NOEXCEPT { - ::deflateEnd(this->strm); - ::free(this->strm); - }); - // finish encoding - strm->next_in = nullptr; - strm->avail_in = 0; - strm->next_out = reinterpret_cast (buf.data()); - strm->avail_out = static_cast (buf.size()); - // call deflate - bool deflating = true; - while(deflating) { - auto err = ::deflate(strm, Z_FINISH); - // cannot report any error safely - we are in destructor - switch (err) { - case Z_OK: - if (strm->avail_out < buf.size()) { - sl::io::write_all(sink, {buf.data(), buf.size() - strm->avail_out}); - strm->next_out = reinterpret_cast (buf.data()); - strm->avail_out = static_cast (buf.size()); - } - // still not finished - break; - case Z_STREAM_END: - if (strm->avail_out < buf.size()) { - sl::io::write_all(sink, {buf.data(), buf.size() - strm->avail_out}); - } - // finished - deflating = false; - break; - default: - // finish - deflating = false; - } - } - } - - /** - * Deleted copy constructor - * - * @param other instance - */ - deflate_sink(const deflate_sink&) = delete; - - /** - * Deleted copy assignment operator - * - * @param other instance - * @return this instance - */ - deflate_sink& operator=(const deflate_sink&) = delete; - - /** - * Move constructor - * - * @param other other instance - */ - deflate_sink(deflate_sink&& other) : - sink(std::move(other.sink)), - buf(std::move(other.buf)), - strm(other.strm) { - other.strm = nullptr; - } - - /** - * Move assignment operator - * - * @param other other instance - * @return this instance - */ - deflate_sink& operator=(deflate_sink&& other) { - sink = std::move(other.sink); - buf = std::move(other.buf); - strm = other.strm; - other.strm = nullptr; - return *this; - } - - /** - * Write implementation - * - * @param span source span - * @return number of bytes processed (read from source span) - */ - std::streamsize write(sl::io::span span) { - // prepare zlib stream - strm->next_in = reinterpret_cast (span.data()); - strm->avail_in = static_cast (span.size()); - strm->next_out = reinterpret_cast (buf.data()); - strm->avail_out = static_cast (buf.size()); - // call deflate - while(strm->avail_in > 0) { - auto err = ::deflate(strm, Z_NO_FLUSH); - switch (err) { - case Z_OK: - if (strm->avail_out < buf.size()) { - sl::io::write_all(sink, {buf.data(), buf.size() - strm->avail_out}); - strm->next_out = reinterpret_cast (buf.data()); - strm->avail_out = static_cast (buf.size()); - } - break; - default: throw compress_exception(TRACEMSG( - "Deflate error: [" + ::zError(err) + "]")); - } - } - return span.size_signed(); - } - - /** - * Calls flush on dest stream - * - * @return value returned by dest stream - */ - std::streamsize flush() { - // note: maybe it is better to enable Z_SYNC_FLUSH support, - // but it will make output result non-deterministic - return sink.flush(); - } - - /** - * Underlying sink accessor - * - * @return underlying sink reference - */ - Sink& get_sink() { - return sink; - } - -}; - -/** - * Factory function for creating deflate sinks, - * created object will own the specified sink - * - * @param sink output sink - * @return deflate sink - */ -template ::value>::type> -deflate_sink make_deflate_sink(Sink&& sink) { - return deflate_sink(std::move(sink)); -} - -/** - * Factory function for creating deflate sinks, - * created object will NOT own the specified sink - * - * @param sink output sink - * @return deflate sink - */ -template -deflate_sink> make_deflate_sink(Sink& sink) { - return deflate_sink> ( - sl::io::make_reference_sink(sink)); -} - -} // namespace -} - -#endif /* STATICLIB_COMPRESS_DEFLATE_SINK_HPP */ - diff --git a/include/staticlib/compress/inflate_source.hpp b/include/staticlib/compress/inflate_source.hpp deleted file mode 100644 index 853e056..0000000 --- a/include/staticlib/compress/inflate_source.hpp +++ /dev/null @@ -1,224 +0,0 @@ -/* - * Copyright 2016, alex at staticlibs.net - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * File: inflate_source.hpp - * Author: alex - * - * Created on January 29, 2016, 9:19 PM - */ - -#ifndef STATICLIB_COMPRESS_INFLATE_SOURCE_HPP -#define STATICLIB_COMPRESS_INFLATE_SOURCE_HPP - -#include -#include -#include -#include -#include - -#include "zlib.h" - -#include "staticlib/config.hpp" -#include "staticlib/io.hpp" - -#include "staticlib/compress/compress_exception.hpp" - - -namespace staticlib { -namespace compress { - -/** - * Source wrapper that decompresses deflated data - */ -template -class inflate_source { - /** - * Source of compressed data - */ - Source src; - /** - * Internal buffer - */ - std::array buf; - /** - * Zlib decompressing stream - */ - z_stream* strm; - /** - * Start position in internal buffer - */ - size_t pos = 0; - /** - * Number of bytes available in internal buffer - */ - size_t avail = 0; - /** - * Source EOF flag - */ - bool exhausted = false; - -public: - /** - * Constructor, created object will own the specified source - * - * @param src source to read compressed data from - */ - inflate_source(Source src) : - src(std::move(src)), - strm([]{ - z_stream* stream = static_cast (std::malloc(sizeof(z_stream))); - if (nullptr == stream) throw compress_exception(TRACEMSG( - "Error creating inflate stream: 'malloc' failed")); - std::memset(stream, 0, sizeof (z_stream)); - auto err = inflateInit2(stream, -MAX_WBITS); - if (Z_OK != err) throw compress_exception(TRACEMSG( - "Error initializing inflate stream: [" + ::zError(err) + "]")); - return stream; - }()) { } - - ~inflate_source() STATICLIB_NOEXCEPT { - if (nullptr == strm) return; - ::inflateEnd(strm); - std::free(strm); - } - - /** - * Deleted copy constructor - * - * @param other instance - */ - inflate_source(const inflate_source&) = delete; - - /** - * Deleted copy assignment operator - * - * @param other instance - * @return this instance - */ - inflate_source& operator=(const inflate_source&) = delete; - - /** - * Move constructor - * - * @param other other instance - */ - inflate_source(inflate_source&& other) : - src(std::move(other.src)), - buf(std::move(other.buf)), - strm(other.strm), - pos(other.pos), - avail(other.avail), - exhausted(other.exhausted) { - other.strm = nullptr; - } - - /** - * Move assignment operator - * - * @param other other instance - * @return this instance - */ - inflate_source& operator=(inflate_source&& other) { - src = std::move(other.src); - buf = std::move(other.buf); - strm = other.strm; - other.strm = nullptr; - pos = other.pos; - avail = other.avail; - exhausted = other.exhausted; - return *this; - } - - /** - * Read implementation - * - * @param span output span - * @return number of bytes written into specified span - */ - std::streamsize read(sl::io::span span) { - if (!exhausted) { - // fill buffer if empty - if (0 == avail) { - avail = sl::io::read_all(src, {buf.data(), buf.size()}); - pos = 0; - } - // prepare zlib stream - strm->next_in = reinterpret_cast (buf.data() + pos); - strm->avail_in = static_cast (avail); - strm->next_out = reinterpret_cast (span.data()); - strm->avail_out = static_cast (span.size()); - // call inflate - auto err = ::inflate(strm, Z_FINISH); - if (Z_OK == err || Z_STREAM_END == err || Z_BUF_ERROR == err) { - std::streamsize read = avail - strm->avail_in; - std::streamsize written = span.size_signed() - strm->avail_out; - size_t uread = static_cast (read); - pos += uread; - avail -= uread; - if (written > 0 || Z_STREAM_END != err) { - return written; - } - exhausted = true; - return std::char_traits::eof(); - } else throw compress_exception(TRACEMSG( - + "Inflate error: [" + ::zError(err) + "]")); - } else { - return std::char_traits::eof(); - } - } - - /** - * Underlying source accessor - * - * @return underlying source reference - */ - Source& get_source() { - return src; - } - -}; - -/** - * Factory function for creating inflate sources, - * created object will own the specified source - * - * @param source input source - * @return inflate source - */ -template ::value>::type> -inflate_source make_inflate_source(Source&& source) { - return inflate_source(std::move(source)); -} - -/** - * Factory function for creating inflate sources, - * created object will NOT own the specified source - * - * @param source input source - * @return inflate source - */ -template -inflate_source> make_inflate_source(Source& source) { - return inflate_source>( - sl::io::make_reference_source(source)); -} - -} // namespace -} - -#endif /* STATICLIB_COMPRESS_INFLATE_SOURCE_HPP */ diff --git a/include/staticlib/compress/lzma_sink.hpp b/include/staticlib/compress/lzma_sink.hpp deleted file mode 100644 index 2d38ca0..0000000 --- a/include/staticlib/compress/lzma_sink.hpp +++ /dev/null @@ -1,244 +0,0 @@ -/* - * Copyright 2016, alex at staticlibs.net - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * File: lzma_sink.hpp - * Author: alex - * - * Created on January 29, 2016, 9:21 PM - */ - -#ifndef STATICLIB_COMPRESS_LZMA_SINK_HPP -#define STATICLIB_COMPRESS_LZMA_SINK_HPP - -#include -#include -#include -#include -#include -#include - -#include "lzma.h" - -#include "staticlib/config.hpp" -#include "staticlib/io.hpp" -#include "staticlib/support.hpp" - -#include "staticlib/compress/compress_exception.hpp" - -namespace staticlib { -namespace compress { - -/** - * Sink wrapper that compressed written data using LZMA algorithm - */ -template -class lzma_sink { - /** - * Destination sink for the compressed data - */ - Sink sink; - /** - * Internal buffer - */ - std::array buf; - /** - * LZMA compressing stream - */ - lzma_stream* strm; - -public: - - /** - * Constructor - * - * @param sink destination to write compressed data into - */ - lzma_sink(Sink&& sink) : - sink(std::move(sink)), - strm([] { - lzma_stream* stream = static_cast (std::malloc(sizeof(lzma_stream))); - if (nullptr == stream) throw compress_exception(TRACEMSG( - "Error creating lzma stream: 'malloc' failed")); - *stream = LZMA_STREAM_INIT; - auto err = ::lzma_easy_encoder(stream, compression_level, LZMA_CHECK_CRC64); - if (LZMA_OK != err) throw compress_exception(TRACEMSG( - "Error initializing LZMA stream, code: [" + sl::support::to_string(err) + "]")); - return stream; - }()) { } - - ~lzma_sink() STATICLIB_NOEXCEPT { - if (nullptr == strm) return; - auto deferred = sl::support::defer([this]() STATICLIB_NOEXCEPT { - ::lzma_end(this->strm); - ::free(this->strm); - }); - // finish encoding - strm->next_in = nullptr; - strm->avail_in = 0; - strm->next_out = reinterpret_cast(buf.data()); - strm->avail_out = buf.size(); - // call code - bool coding = true; - while (coding) { - auto err = ::lzma_code(strm, LZMA_FINISH); - switch (err) { - case LZMA_OK: - if (strm->avail_out < buf.size()) { - sl::io::write_all(sink, {buf.data(), buf.size() - strm->avail_out}); - strm->next_out = reinterpret_cast(buf.data()); - strm->avail_out = buf.size(); - } - // not finished - break; - case LZMA_STREAM_END: - if (strm->avail_out < buf.size()) { - sl::io::write_all(sink, {buf.data(), buf.size() - strm->avail_out}); - } - // finished - coding = false; - break; - default: - // finish - coding = false; - } - } - } - - /** - * Deleted copy constructor - * - * @param other instance - */ - lzma_sink(const lzma_sink&) = delete; - - /** - * Deleted copy assignment operator - * - * @param other instance - * @return this instance - */ - lzma_sink& operator=(const lzma_sink&) = delete; - - /** - * Move constructor - * - * @param other other instance - */ - lzma_sink(lzma_sink&& other) : - sink(std::move(other.sink)), - buf(std::move(other.buf)), - strm(other.strm) { - other.strm = nullptr; - } - - /** - * Move assignment operator - * - * @param other other instance - * @return this instance - */ - lzma_sink& operator=(lzma_sink&& other) { - sink = std::move(other.sink); - buf = std::move(other.buf); - strm = other.strm; - other.strm = nullptr; - return *this; - } - - /** - * Write implementation - * - * @param span source span - * @return number of bytes processed (read from source span) - */ - std::streamsize write(sl::io::span span) { - // prepare lzma stream - strm->next_in = reinterpret_cast(span.data()); - strm->avail_in = static_cast (span.size()); - strm->next_out = reinterpret_cast(buf.data()); - strm->avail_out = buf.size(); - // call code - while (strm->avail_in > 0) { - auto err = ::lzma_code(strm, LZMA_RUN); - switch (err) { - case LZMA_OK: - if (strm->avail_out < buf.size()) { - sl::io::write_all(sink, {buf.data(), buf.size() - strm->avail_out}); - strm->next_out = reinterpret_cast(buf.data()); - strm->avail_out = buf.size(); - } - break; - default: throw compress_exception(TRACEMSG( - "LZMA error code: [" + sl::support::to_string(err) + "]")); - } - } - return span.size_signed(); - } - - /** - * Calls flush on dest stream - * - * @return value returned by dest stream - */ - std::streamsize flush() { - // note: maybe it is better to enable LZMA_SYNC_FLUSH support, - // but it will make output result non-deterministic - return sink.flush(); - } - - /** - * Underlying sink accessor - * - * @return underlying sink reference - */ - Sink& get_sink() { - return sink; - } -}; - -/** - * Factory function for creating lzma sinks, - * created object will own the specified sink - * - * @param sink output sink - * @return lzma sink - */ -template ::value>::type> -lzma_sink make_lzma_sink(Sink&& sink) { - return lzma_sink(std::move(sink)); -} - -/** - * Factory function for creating lzma sinks, - * created object will NOT own the specified sink - * - * @param sink output sink - * @return lzma sink - */ -template -lzma_sink> make_lzma_sink(Sink& sink) { - return lzma_sink> ( - sl::io::make_reference_sink(sink)); -} - -} // namespace -} - - -#endif /* STATICLIB_COMPRESS_LZMA_SINK_HPP */ - diff --git a/include/staticlib/compress/lzma_source.hpp b/include/staticlib/compress/lzma_source.hpp deleted file mode 100644 index b5a5cfc..0000000 --- a/include/staticlib/compress/lzma_source.hpp +++ /dev/null @@ -1,228 +0,0 @@ -/* - * Copyright 2016, alex at staticlibs.net - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * File: lzma_source.hpp - * Author: alex - * - * Created on January 29, 2016, 9:21 PM - */ - -#ifndef STATICLIB_COMPRESS_LZMA_SOURCE_HPP -#define STATICLIB_COMPRESS_LZMA_SOURCE_HPP - -#include -#include -#include -#include -#include -#include - -#include "lzma.h" - -#include "staticlib/config.hpp" -#include "staticlib/io.hpp" - -#include "staticlib/compress/compress_exception.hpp" - - -namespace staticlib { -namespace compress { - -/** - * Source wrapper that decompresses deflated data - */ -template -class lzma_source { - /** - * Source of compressed data - */ - Source src; - /** - * Internal buffer - */ - std::array buf; - /** - * LZMA decompressing stream - */ - lzma_stream* strm; - /** - * Start position in internal buffer - */ - size_t pos = 0; - /** - * Number of bytes available in internal buffer - */ - size_t avail = 0; - /** - * Source EOF flag - */ - bool exhausted = false; - -public: - - /** - * Constructor, created object will own the specified source - * - * @param src source to read compressed data from - */ - lzma_source(Source src) : - src(std::move(src)), - strm([] { - lzma_stream* stream = static_cast (std::malloc(sizeof(lzma_stream))); - if (nullptr == stream) throw compress_exception(TRACEMSG( - "Error creating lzma stream: 'malloc' failed")); - *stream = LZMA_STREAM_INIT; - auto err = lzma_stream_decoder(stream, UINT64_MAX, 0); - if (LZMA_OK != err) throw compress_exception(TRACEMSG( - "Error initializing LZMA stream, code: [" + sl::support::to_string(err) + "]")); - return stream; - }()) { } - - ~lzma_source() STATICLIB_NOEXCEPT { - if (nullptr == strm) return; - ::lzma_end(strm); - std::free(strm); - } - - /** - * Deleted copy constructor - * - * @param other instance - */ - lzma_source(const lzma_source&) = delete; - - /** - * Deleted copy assignment operator - * - * @param other instance - * @return this instance - */ - lzma_source& operator=(const lzma_source&) = delete; - - /** - * Move constructor - * - * @param other other instance - */ - lzma_source(lzma_source&& other) : - src(std::move(other.src)), - buf(std::move(other.buf)), - strm(other.strm), - pos(other.pos), - avail(other.avail), - exhausted(other.exhausted) { - other.strm = nullptr; - } - - /** - * Move assignment operator - * - * @param other other instance - * @return this instance - */ - lzma_source& operator=(lzma_source&& other) { - src = std::move(other.src); - buf = std::move(other.buf); - strm = other.strm; - other.strm = nullptr; - pos = other.pos; - avail = other.avail; - exhausted = other.exhausted; - return *this; - } - - /** - * Read implementation - * - * @param span output span - * @return number of bytes written into specified span - */ - std::streamsize read(sl::io::span span) { - if (!exhausted) { - // fill buffer if empty - if (0 == avail) { - avail = sl::io::read_all(src, {buf.data(), buf.size()}); - pos = 0; - } - // prepare zlib stream - strm->next_in = reinterpret_cast (buf.data() + pos); - strm->avail_in = avail; - strm->next_out = reinterpret_cast (span.data()); - strm->avail_out = static_cast (span.size()); - // call inflate - auto err = ::lzma_code(strm, LZMA_RUN); - if (LZMA_OK == err || LZMA_STREAM_END == err) { - std::streamsize read = avail - strm->avail_in; - std::streamsize written = span.size_signed() - strm->avail_out; - size_t uread = static_cast (read); - pos += uread; - avail -= uread; - if (written > 0 || LZMA_STREAM_END != err) { - return written; - } - exhausted = true; - return std::char_traits::eof(); - } else throw compress_exception(TRACEMSG( - + "LZMA error, code: [" + sl::support::to_string(err) + "]")); - } else { - return std::char_traits::eof(); - } - } - - /** - * Underlying source accessor - * - * @return underlying source reference - */ - Source& get_source() { - return src; - } - -}; - -/** - * Factory function for creating lzma sources, - * created object will own the specified source - * - * @param source input source - * @return lzma source - */ -template ::value>::type> -lzma_source make_lzma_source(Source&& source) { - return lzma_source(std::move(source)); -} - -/** - * Factory function for creating lzma sources, - * created object will NOT own the specified source - * - * @param source input source - * @return lzma source - */ -template -lzma_source> make_lzma_source(Source& source) { - return lzma_source> ( - sl::io::make_reference_source(source)); -} - -} // namespace -} - - -#endif /* STATICLIB_COMPRESS_LZMA_SOURCE_HPP */ - diff --git a/include/staticlib/compress/zip_compression_method.hpp b/include/staticlib/compress/zip_compression_method.hpp deleted file mode 100644 index e2af225..0000000 --- a/include/staticlib/compress/zip_compression_method.hpp +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2017, alex at staticlibs.net - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * File: zip_compression_method.hpp - * Author: alex - * - * Created on December 3, 2017, 5:14 PM - */ - -#ifndef STATICLIB_COMPRESS_ZIP_COMPRESSION_METHOD_HPP -#define STATICLIB_COMPRESS_ZIP_COMPRESSION_METHOD_HPP - -#include - -namespace staticlib { -namespace compress { - - enum class zip_compression_method : uint16_t { - store = 0, - deflate = 0x8 - }; - -} // namespace -} - -#endif /* STATICLIB_COMPRESS_ZIP_COMPRESSION_METHOD_HPP */ - diff --git a/include/staticlib/compress/zip_sink.hpp b/include/staticlib/compress/zip_sink.hpp deleted file mode 100644 index c8dafb0..0000000 --- a/include/staticlib/compress/zip_sink.hpp +++ /dev/null @@ -1,351 +0,0 @@ -/* - * Copyright 2016, alex at staticlibs.net - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * File: zip_sink.hpp - * Author: alex - * - * Created on February 13, 2016, 5:30 PM - */ - -#ifndef STATICLIB_COMPRESS_ZIP_SINK_HPP -#define STATICLIB_COMPRESS_ZIP_SINK_HPP - -#include -#include -#include -#include - -#include "zlib.h" - -#include "staticlib/config.hpp" -#include "staticlib/io.hpp" -#include "staticlib/endian.hpp" - -#include "staticlib/compress/compress_exception.hpp" -#include "staticlib/compress/deflate_sink.hpp" -#include "staticlib/compress/zip_compression_method.hpp" - -namespace staticlib { -namespace compress { - -namespace detail { - -/** - * https://en.wikipedia.org/wiki/Zip_%28file_format%29 - */ -class Header { - std::string filename; - uint16_t compression_method; - - uint32_t offset = 0; - uint32_t compressed_size = 0; - uint32_t uncompressed_size = 0; - uint32_t crc = 0; - -public: - - Header(std::string filename, uint16_t compression_method) : - filename(std::move(filename)), - compression_method(compression_method) { } - - template - void write_local_file_header(Sink& sink, uint32_t offset) { - namespace en = staticlib::endian; - // Local file header signature - en::write_32_le(sink, 0x04034b50); - // Version needed to extract (minimum) - en::write_16_le(sink, 10); - // General purpose bit flag - en::write_16_le(sink, 8); - // Compression method - en::write_16_le(sink, compression_method); - // File last modification time - en::write_16_le(sink, 0); - // File last modification date - en::write_16_le(sink, 0); - // CRC-32 - en::write_32_le(sink, 0); - // Compressed size - en::write_32_le(sink, 0); - // Uncompressed size - en::write_32_le(sink, 0); - // File name length (n) - en::write_16_le(sink, filename.length()); - // Extra field length (m) - en::write_16_le(sink, 0); - // File name - io::write_all(sink, {filename.data(), filename.length()}); - // save offset for CD - this->offset = offset; - } - - template - void write_data_descriptor(Sink& sink, uint32_t compressed_size, uint32_t uncompressed_size, uint32_t crc) { - namespace en = staticlib::endian; - // Optional data descriptor signature - en::write_32_le(sink, 0x08074b50); - // CRC-32 - en::write_32_le(sink, crc); - // Compressed size - en::write_32_le(sink, compressed_size); - // Uncompressed size - en::write_32_le(sink, uncompressed_size); - // save sizes for CD - this->compressed_size = compressed_size; - this->uncompressed_size = uncompressed_size; - // save crc for CD - this->crc = crc; - } - - template - void write_cd_file_header(Sink& sink) { - namespace en = staticlib::endian; - // Central directory file header signature - en::write_32_le(sink, 0x02014b50); - // Version made by - en::write_16_le(sink, 10); - // Version needed to extract (minimum) - en::write_16_le(sink, 10); - // General purpose bit flag - en::write_16_le(sink, 8); - // Compression method - en::write_16_le(sink, compression_method); - // File last modification time - en::write_16_le(sink, 0); - // File last modification date - en::write_16_le(sink, 0); - // CRC-32 - en::write_32_le(sink, crc); - // Compressed size - en::write_32_le(sink, compressed_size); - // Uncompressed size - en::write_32_le(sink, uncompressed_size); - // File name length (n) - en::write_16_le(sink, filename.length()); - // Extra field length (m) - en::write_16_le(sink, 0); - // File comment length (k) - en::write_16_le(sink, 0); - // Disk number where file starts - en::write_16_le(sink, 0); - // Internal file attributes - en::write_16_le(sink, 0); - // External file attributes - en::write_32_le(sink, 0); - // Relative offset of local file header. - en::write_32_le(sink, offset); - // File name - io::write_all(sink, {filename.data(), filename.length()}); - } - -}; - -template -void write_eocd(Sink& sink, uint16_t files_count, uint32_t cd_offset, uint32_t cd_length) { - namespace en = staticlib::endian; - // End of central directory signature - en::write_32_le(sink, 0x06054b50); - // Number of this disk - en::write_16_le(sink, 0); - // Disk where central directory starts - en::write_16_le(sink, 0); - // Number of central directory records on this disk - en::write_16_le(sink, files_count); - // Total number of central directory records - en::write_16_le(sink, files_count); - // Size of central directory (bytes) - en::write_32_le(sink, cd_length); - // Offset of start of central directory - en::write_32_le(sink, cd_offset); - // Comment length (n) - en::write_16_le(sink, 0); -} - -} // namespace - -/** - * Sink wrapper that creates ZIP archives, - * CRC sum and compression of entries is NOT supported - */ -template -class zip_sink { -private: - // stream shortcuts - using sink_ref_type = sl::io::reference_sink>; - using entry_counter_ref_type = sl::io::reference_sink>; - using deflater_type = sl::io::counting_sink>; - - /** - * Destination sink for the zipped data - */ - zip_compression_method method = zip_compression_method::deflate; - sl::io::counting_sink sink; - std::vector headers; - bool cd_written = false; - - sl::io::counting_sink entry_counter; - std::unique_ptr entry_deflater; - uint32_t entry_crc = 0; - -public: - - /** - * Constructor - * - * @param sink destination to write compressed data into - */ - zip_sink(Sink&& sink) : - sink(sl::io::make_counting_sink(std::move(sink))), - entry_counter(sl::io::make_counting_sink(this->sink)), - entry_deflater(nullptr) { } - - /** - * Destructor, will call `finalize()` if it have not been called yet - */ - ~zip_sink() STATICLIB_NOEXCEPT { - try { - finalize(); - } catch(...) { - // ignore - } - } - - /** - * Deleted copy constructor - * - * @param other instance - */ - zip_sink(const zip_sink&) = delete; - - /** - * Deleted copy assignment operator - * - * @param other instance - * @return this instance - */ - zip_sink& operator=(const zip_sink&) = delete; - - /** - * Write implementation - * - * @param span source span - * @return number of bytes processed (read from source buf) - */ - std::streamsize write(sl::io::span span) { - if (nullptr != entry_deflater.get()) { - size_t count_before = entry_deflater->get_count(); - entry_deflater->write(span); - size_t count = entry_deflater->get_count() - count_before; - this->entry_crc = ::crc32(entry_crc, reinterpret_cast(span.data()), static_cast(count)); - return static_cast(count); - } else { - throw compress_exception(TRACEMSG("Invalid ZIP sink state: add ZIP entry before writing the data")); - } - } - - /** - * Calls flush on dest stream - * - * @return value returned by dest stream - */ - std::streamsize flush() { - return sink.flush(); - } - - /** - * Add ZIP entry with the specified name to archive - * - * @param filename ZIP entry name - */ - void add_entry(const std::string& filename) { - if (filename.empty()) throw compress_exception(TRACEMSG("Invalid empty entry name specified")); - if (cd_written) throw new compress_exception(TRACEMSG( - "Invalid entry add attempt for finalized ZIP stream")); - if (headers.size() > 0) { - write_entry_data_descriptor(); - } - // add new entry - headers.emplace_back(std::string(filename.data(), filename.length()), static_cast(method)); - headers.back().write_local_file_header(sink, static_cast(sink.get_count())); - entry_deflater.reset(new sl::io::counting_sink>(make_deflate_sink(entry_counter))); - entry_crc = ::crc32(0L, Z_NULL, 0); - } - - /** - * Finalizes ZIP archive writing Central Directory, - * may be safely called multiple times, - * will be called from destructor if not called explicitely - */ - void finalize() { - if (!cd_written && headers.size() > 0) { - write_entry_data_descriptor(); - uint32_t cd_offset = static_cast(sink.get_count()); - for (detail::Header& he : headers) { - he.write_cd_file_header(sink); - } - size_t cd_len = sink.get_count() - cd_offset; - detail::write_eocd(sink, static_cast(headers.size()), cd_offset, static_cast(cd_len)); - cd_written = true; - } - } - -private: - void write_entry_data_descriptor() { - // get size and close current entry - uint32_t uncompressed_size = static_cast(entry_deflater->get_count()); - entry_deflater.reset(nullptr); - // get size and reset counter - uint32_t compressed_size = static_cast(entry_counter.get_count()); - entry_counter = sl::io::make_counting_sink(sink); - headers.back().write_data_descriptor(sink, compressed_size, uncompressed_size, entry_crc); - } - -}; - -/** - * Factory function for creating zip sinks, - * created object will own the specified sink - * - * @param sink output sink - * @return zip sink - */ -template ::value>::type> -sl::io::unique_sink> make_zip_sink(Sink&& sink) { - auto ptr = new zip_sink(std::move(sink)); - return sl::io::make_unique_sink(ptr); -} - -/** - * Factory function for creating zip sinks, - * created object will NOT own the specified sink - * - * @param sink output sink - * @return zip sink - */ -template -sl::io::unique_sink>> make_zip_sink(Sink& sink) { - auto ptr = new zip_sink> ( - sl::io::make_reference_sink(sink)); - return sl::io::make_unique_sink(ptr); -} - -} // namespace -} - -#endif /* STATICLIB_COMPRESS_ZIP_SINK_HPP */ - diff --git a/resources/Doxyfile.in b/resources/Doxyfile.in deleted file mode 100644 index aa40c10..0000000 --- a/resources/Doxyfile.in +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright 2015, alex at staticlibs.net -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Doxyfile 1.8.1.2 - -DOXYFILE_ENCODING = UTF-8 -PROJECT_NAME = ${PROJECT_NAME} -PROJECT_NUMBER = ${${PROJECT_NAME}_STATICLIB_VERSION} -PROJECT_LOGO = ${CMAKE_CURRENT_LIST_DIR}/resources/logo.png -OUTPUT_DIRECTORY = ${CMAKE_CURRENT_BINARY_DIR}/docs -FULL_PATH_NAMES = YES -STRIP_FROM_PATH = ${CMAKE_CURRENT_LIST_DIR}/include/ -STRIP_FROM_INC_PATH = ${CMAKE_CURRENT_LIST_DIR}/include/ -EXTRACT_ALL = YES -EXTRACT_STATIC = YES -JAVADOC_AUTOBRIEF = YES -INPUT = ${CMAKE_CURRENT_LIST_DIR}/include -INPUT_ENCODING = UTF-8 -RECURSIVE = YES -GENERATE_LATEX = NO diff --git a/resources/macros.cmake b/resources/macros.cmake deleted file mode 100644 index 07ba038..0000000 --- a/resources/macros.cmake +++ /dev/null @@ -1,51 +0,0 @@ -# Copyright 2015, alex at staticlibs.net -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -cmake_minimum_required ( VERSION 2.8.12 ) - -# enhanced version of pkg_check_modules macro with PKG_CONFIG_PATH logic -# PKG_CONFIG_PATH handling through CMAKE_PREFIX_PATH was added in newer versions of CMake -macro ( ${PROJECT_NAME}_pkg_check_modules _out_var_name _modifier _modules_list_var_name ) - find_package ( PkgConfig ) - if ( WIN32 ) - set ( PATHENV_SEPARATOR ";" ) - else ( ) - set ( PATHENV_SEPARATOR ":" ) - endif ( ) - set (_pkgconfig_path $ENV{PKG_CONFIG_PATH} ) - if ( STATICLIB_USE_DEPLIBS_CACHE ) - set ( ENV{PKG_CONFIG_PATH} "${STATICLIB_DEPLIBS_CACHE_DIR}/pkgconfig${PATHENV_SEPARATOR}$ENV{PKG_CONFIG_PATH}" ) - endif ( ) - set ( ENV{PKG_CONFIG_PATH} "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/pkgconfig${PATHENV_SEPARATOR}$ENV{PKG_CONFIG_PATH}" ) - pkg_check_modules ( ${_out_var_name} ${_modifier} ${${_modules_list_var_name}} ) - set ( ENV{PKG_CONFIG_PATH} ${_pkgconfig_path} ) -endmacro ( ) - -# converts list to space-separated string with a prefix to each element -macro ( ${PROJECT_NAME}_list_to_string _out_var_name _prefix _list_var_name ) - set ( ${_out_var_name} "" ) - foreach ( _el ${${_list_var_name}} ) - set ( ${_out_var_name} "${${_out_var_name}}${_prefix}${_el} " ) - endforeach ( ) -endmacro ( ) - -# call add_subdirectory using only if specified module is not yet added to main project -macro ( ${PROJECT_NAME}_add_subdirectory _project_path ) - string ( REGEX REPLACE "^.*/" "" _target_name ${_project_path} ) - if ( NOT TARGET ${_target_name} ) - message ( STATUS "Adding dependency: [${_target_name}], path: [${_project_path}]" ) - add_subdirectory ( ${_project_path} ${CMAKE_BINARY_DIR}/${_target_name} ) - set_target_properties ( ${_target_name} PROPERTIES FOLDER "deps" ) - endif ( ) -endmacro ( ) diff --git a/resources/pkg-config.in b/resources/pkg-config.in deleted file mode 100644 index 0e18191..0000000 --- a/resources/pkg-config.in +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright 2015, alex at staticlibs.net -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -Name: ${PROJECT_NAME} -Description: ${${PROJECT_NAME}_DESCRIPTION} -URL: ${${PROJECT_NAME}_URL} -Version: ${${PROJECT_NAME}_STATICLIB_VERSION} - -Requires: ${${PROJECT_NAME}_PC_REQUIRES} -Requires.private: ${${PROJECT_NAME}_PC_REQUIRES_PRIVATE} -Libs: ${${PROJECT_NAME}_PC_LIBS} -Libs.private: ${${PROJECT_NAME}_PC_LIBS_PRIVATE} -Cflags: ${${PROJECT_NAME}_PC_CFLAGS} diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt deleted file mode 100644 index 25f08de..0000000 --- a/test/CMakeLists.txt +++ /dev/null @@ -1,62 +0,0 @@ -# Copyright 2016, alex at staticlibs.net -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -cmake_minimum_required ( VERSION 2.8.12 ) - -# toolchain setup -set ( STATICLIB_TOOLCHAIN linux_amd64_gcc CACHE STRING "toolchain triplet" ) -if ( NOT DEFINED STATICLIB_CMAKE ) - set ( STATICLIB_CMAKE ${CMAKE_CURRENT_LIST_DIR}/../../cmake CACHE INTERNAL "" ) -endif ( ) -set ( CMAKE_TOOLCHAIN_FILE ${STATICLIB_CMAKE}/toolchains/${STATICLIB_TOOLCHAIN}.cmake CACHE INTERNAL "" ) - -# project -project ( staticlib_compress_test CXX ) -include ( ${STATICLIB_CMAKE}/staticlibs_common.cmake ) -staticlib_enable_deplibs_cache ( ) - -set ( staticlib_compress_ENABLE_XZ ON CACHE BOOL "") - -# dependencies -if ( NOT DEFINED STATICLIB_DEPS ) - set ( STATICLIB_DEPS ${CMAKE_CURRENT_LIST_DIR}/../../ CACHE INTERNAL "" ) -endif ( ) -staticlib_add_subdirectory ( ${STATICLIB_DEPS}/staticlib_config ) -staticlib_add_subdirectory ( ${STATICLIB_DEPS}/staticlib_support ) -staticlib_add_subdirectory ( ${STATICLIB_DEPS}/staticlib_io ) -staticlib_add_subdirectory ( ${STATICLIB_DEPS}/staticlib_endian ) -staticlib_add_subdirectory ( ${STATICLIB_DEPS}/staticlib_utils ) -staticlib_add_subdirectory ( ${STATICLIB_DEPS}/staticlib_tinydir ) -if ( NOT STATICLIB_TOOLCHAIN MATCHES "linux_[^_]+_[^_]+" ) - staticlib_add_subdirectory ( ${STATICLIB_DEPS}/external_zlib ) - staticlib_add_subdirectory ( ${STATICLIB_DEPS}/external_xz ) -endif ( ) -staticlib_add_subdirectory ( ${CMAKE_CURRENT_LIST_DIR}/../../staticlib_compress ) -set ( ${PROJECT_NAME}_DEPS - staticlib_compress - staticlib_config - staticlib_support - staticlib_io - staticlib_endian - staticlib_utils - staticlib_tinydir - zlib - liblzma ) -staticlib_pkg_check_modules ( ${PROJECT_NAME}_DEPS_PC REQUIRED ${PROJECT_NAME}_DEPS ) - -# tests -set ( ${PROJECT_NAME}_TEST_INCLUDES ${${PROJECT_NAME}_DEPS_PC_INCLUDE_DIRS} ) -set ( ${PROJECT_NAME}_TEST_LIBS ${${PROJECT_NAME}_DEPS_PC_STATIC_LIBRARIES} ) -set ( ${PROJECT_NAME}_TEST_OPTS ${${PROJECT_NAME}_DEPS_PC_CFLAGS_OTHER} ) -staticlib_enable_testing ( ${PROJECT_NAME}_TEST_INCLUDES ${PROJECT_NAME}_TEST_LIBS ${PROJECT_NAME}_TEST_OPTS ) diff --git a/test/data/hello.txt b/test/data/hello.txt deleted file mode 100644 index b6fc4c6..0000000 --- a/test/data/hello.txt +++ /dev/null @@ -1 +0,0 @@ -hello \ No newline at end of file diff --git a/test/data/hello.txt.deflate b/test/data/hello.txt.deflate deleted file mode 100644 index 0910d31..0000000 Binary files a/test/data/hello.txt.deflate and /dev/null differ diff --git a/test/data/hello.txt.xz b/test/data/hello.txt.xz deleted file mode 100644 index 1276eb9..0000000 Binary files a/test/data/hello.txt.xz and /dev/null differ diff --git a/test/deflate_sink_test.cpp b/test/deflate_sink_test.cpp deleted file mode 100644 index 708354a..0000000 --- a/test/deflate_sink_test.cpp +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright 2016, alex at staticlibs.net - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * File: deflate_sink_test.cpp - * Author: alex - * - * Created on February 6, 2016, 12:43 PM - */ - -#include "staticlib/compress/deflate_sink.hpp" - -#include -#include - -#include "staticlib/config/assert.hpp" -#include "staticlib/io.hpp" -#include "staticlib/tinydir.hpp" - -void test_deflate() { - auto fd_comp = sl::tinydir::file_source("../test/data/hello.txt.deflate"); - auto ss_comp = sl::io::string_sink(); - sl::io::copy_all(fd_comp, ss_comp); - - auto fd = sl::tinydir::file_source("../test/data/hello.txt"); - auto ss = sl::io::string_sink(); - { - auto deflater = sl::compress::make_deflate_sink(ss); - sl::io::copy_all(fd, deflater); - } - - slassert(ss_comp.get_string() == ss.get_string()); -} - -void test_huge() { - auto fd_in = sl::tinydir::file_source("/home/alex/vbox/hd/winxp_printer.vdi"); - auto deflater = sl::compress::make_deflate_sink(sl::tinydir::file_sink("winxp_printer.vdi.deflate")); - sl::io::copy_all(fd_in, deflater); -} - -int main() { - try { - test_deflate(); -// test_huge(); - } catch (const std::exception& e) { - std::cout << e.what() << std::endl; - return 1; - } - return 0; -} - diff --git a/test/inflate_source_test.cpp b/test/inflate_source_test.cpp deleted file mode 100644 index 5e0ee18..0000000 --- a/test/inflate_source_test.cpp +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright 2016, alex at staticlibs.net - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * File: inflate_source_test.cpp - * Author: alex - * - * Created on February 4, 2016, 3:17 PM - */ - -#include "staticlib/compress/inflate_source.hpp" - -#include -#include - -#include "staticlib/config/assert.hpp" -#include "staticlib/io.hpp" -#include "staticlib/tinydir.hpp" - -void test_inflate() { - auto fd = sl::tinydir::file_source("../test/data/hello.txt.deflate"); - auto inflater = sl::compress::make_inflate_source(fd); - auto ss = sl::io::string_sink(); - sl::io::copy_all(inflater, ss); - slassert("hello" == ss.get_string()); -} - -void test_huge() { - auto inflater = sl::compress::make_inflate_source(sl::tinydir::file_source("winxp_printer.vdi.deflate")); - auto fd_out = sl::tinydir::file_sink("winxp_printer.vdi"); - sl::io::copy_all(inflater, fd_out); -} - -int main() { - try { - test_inflate(); -// test_huge(); - } catch (const std::exception& e) { - std::cout << e.what() << std::endl; - return 1; - } - return 0; -} diff --git a/test/lzma_sink_test.cpp b/test/lzma_sink_test.cpp deleted file mode 100644 index b13c36f..0000000 --- a/test/lzma_sink_test.cpp +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright 2016, alex at staticlibs.net - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * File: lzma_sink_test.test - * Author: alex - * - * Created on February 6, 2016, 3:17 PM - */ - -#include "staticlib/compress/lzma_sink.hpp" - -#include -#include - -#include "staticlib/config/assert.hpp" -#include "staticlib/io.hpp" -#include "staticlib/tinydir.hpp" - -void test_lzma() { - auto fd_comp = sl::tinydir::file_source("../test/data/hello.txt.xz"); - auto ss_comp = sl::io::string_sink(); - sl::io::copy_all(fd_comp, ss_comp); - - auto fd = sl::tinydir::file_source("../test/data/hello.txt"); - auto ss = sl::io::string_sink(); - { - auto coder = sl::compress::make_lzma_sink(ss); - sl::io::copy_all(fd, coder); - } - - slassert(ss_comp.get_string() == ss.get_string()); -} - -void test_huge() { - auto fd_in = sl::tinydir::file_source("/home/alex/ebook/maugham/bondage.txt"); - auto coder = sl::compress::make_lzma_sink(sl::tinydir::file_sink("bondage.txt.xz")); - sl::io::copy_all(fd_in, coder); -} - -int main() { - try { - test_lzma(); -// test_huge(); - } catch (const std::exception& e) { - std::cout << e.what() << std::endl; - return 1; - } - return 0; -} - diff --git a/test/lzma_source_test.cpp b/test/lzma_source_test.cpp deleted file mode 100644 index 0d05d58..0000000 --- a/test/lzma_source_test.cpp +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright 2016, alex at staticlibs.net - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * File: lzma_source_test.cpp - * Author: alex - * - * Created on February 6, 2016, 3:40 PM - */ - -#include "staticlib/compress/lzma_source.hpp" - -#include -#include - -#include "staticlib/config/assert.hpp" -#include "staticlib/io.hpp" -#include "staticlib/tinydir.hpp" - -void test_lzma() { - auto fd = sl::tinydir::file_source("../test/data/hello.txt.xz"); - auto coder = sl::compress::make_lzma_source(fd); - auto ss = sl::io::string_sink(); - sl::io::copy_all(coder, ss); - slassert("hello" == ss.get_string()); -} - -void test_huge() { - auto inflater = sl::compress::make_lzma_source(sl::tinydir::file_source("bondage.txt.xz")); - auto fd_out = sl::tinydir::file_sink("bondage.txt"); - sl::io::copy_all(inflater, fd_out); -} - -int main() { - try { - test_lzma(); -// test_huge(); - } catch (const std::exception& e) { - std::cout << e.what() << std::endl; - return 1; - } - return 0; -} - - diff --git a/test/zip_sink_test.cpp b/test/zip_sink_test.cpp deleted file mode 100644 index 1baf1e7..0000000 --- a/test/zip_sink_test.cpp +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2016, alex at staticlibs.net - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * File: zip_sink_test.cpp - * Author: alex - * - * Created on February 13, 2016, 8:16 PM - */ - -#include "staticlib/compress/zip_sink.hpp" - -#include -#include - -#include "staticlib/config/assert.hpp" -#include "staticlib/io.hpp" -#include "staticlib/tinydir.hpp" - -void test_store() { - auto sink = sl::compress::make_zip_sink(sl::tinydir::file_sink("test.zip")); - sink.get_sink().add_entry("foo.txt"); - sink.write({"hello", 5}); - sink.get_sink().add_entry("bar/baz.txt"); - sink.write({"bye", 3}); -} - -int main() { - try { - test_store(); - } catch (const std::exception& e) { - std::cout << e.what() << std::endl; - return 1; - } - return 0; -} -