├── VERSION
├── src
├── compress
│ ├── table
│ │ └── Makefile
│ ├── Makefile
│ ├── VSEncodingBlocksHybrind.cpp
│ └── OPTPForDelta.cpp
├── io
│ └── Makefile
└── Makefile
├── tool
├── Makefile
└── run-perfs.sh
├── .testdata
└── gov2.dat
├── TODO
├── .gitignore
├── .utest
└── gtest-1.6.0
│ ├── xcode
│ ├── Config
│ │ ├── TestTarget.xcconfig
│ │ ├── FrameworkTarget.xcconfig
│ │ ├── StaticLibraryTarget.xcconfig
│ │ ├── DebugProject.xcconfig
│ │ ├── ReleaseProject.xcconfig
│ │ └── General.xcconfig
│ ├── Samples
│ │ └── FrameworkSample
│ │ │ ├── Info.plist
│ │ │ ├── widget.h
│ │ │ ├── widget.cc
│ │ │ ├── runtests.sh
│ │ │ └── widget_test.cc
│ ├── Resources
│ │ └── Info.plist
│ └── Scripts
│ │ └── runtests.sh
│ ├── m4
│ ├── ltversion.m4
│ └── gtest.m4
│ ├── CONTRIBUTORS
│ ├── COPYING
│ ├── test
│ ├── production.cc
│ ├── gtest_main_unittest.cc
│ ├── gtest_uninitialized_test_.cc
│ ├── gtest_xml_outfile1_test_.cc
│ ├── gtest_xml_outfile2_test_.cc
│ ├── gtest-typed-test2_test.cc
│ ├── gtest_help_test_.cc
│ ├── production.h
│ ├── gtest_all_test.cc
│ ├── gtest_prod_test.cc
│ ├── gtest_sole_header_test.cc
│ ├── gtest-param-test_test.h
│ ├── gtest_no_test_unittest.cc
│ ├── gtest-typed-test_test.h
│ ├── gtest_throw_on_failure_test_.cc
│ ├── gtest_uninitialized_test.py
│ ├── gtest_list_tests_unittest_.cc
│ ├── gtest-param-test2_test.cc
│ ├── gtest_color_test_.cc
│ ├── gtest_break_on_failure_unittest_.cc
│ ├── gtest_throw_on_failure_ex_test.cc
│ ├── gtest_shuffle_test_.cc
│ └── gtest_env_var_test.py
│ ├── src
│ ├── gtest_main.cc
│ └── gtest-all.cc
│ ├── fused-src
│ └── gtest
│ │ └── gtest_main.cc
│ ├── codegear
│ ├── gtest_all.cc
│ ├── gtest_link.cc
│ └── gtest.groupproj
│ ├── scripts
│ └── test
│ │ └── Makefile
│ ├── samples
│ ├── sample4_unittest.cc
│ ├── sample1.h
│ ├── sample4.cc
│ ├── sample4.h
│ ├── sample2.cc
│ ├── sample1.cc
│ └── sample2.h
│ ├── build-aux
│ └── config.h.in
│ ├── include
│ └── gtest
│ │ └── gtest_prod.h
│ ├── msvc
│ ├── gtest.sln
│ ├── gtest-md.sln
│ └── gtest.vcproj
│ ├── configure.ac
│ └── make
│ └── Makefile
├── include
├── compress
│ ├── policy
│ │ ├── decDelta.hpp
│ │ ├── decGamma.hpp
│ │ ├── decUnary.hpp
│ │ ├── VariableByte.hpp
│ │ ├── VSE-R.hpp
│ │ ├── VSEncodingBlocksHybrid.hpp
│ │ ├── VSEncodingNaive.hpp
│ │ ├── OPTPForDelta.hpp
│ │ ├── N_Delta.hpp
│ │ ├── N_Gamma.hpp
│ │ ├── F_Delta.hpp
│ │ ├── F_Gamma.hpp
│ │ ├── FG_Delta.hpp
│ │ ├── FU_Delta.hpp
│ │ ├── FU_Gamma.hpp
│ │ ├── VSEncodingRest.hpp
│ │ ├── VSEncodingBlocks.hpp
│ │ ├── VSEncodingDP.hpp
│ │ ├── BinaryInterpolative.hpp
│ │ ├── VSEncodingSimple.hpp
│ │ ├── PForDelta.hpp
│ │ ├── Simple16.hpp
│ │ └── Simple9.hpp
│ └── EncodingBase.hpp
├── integer_encoding.hpp
├── io
│ ├── BitsWriter.hpp
│ └── BitsReader.hpp
└── vcompress.hpp
├── .inspection.sh
├── README
├── Makefile
└── NOTICE
/VERSION:
--------------------------------------------------------------------------------
1 | 0.3.0
2 |
3 |
--------------------------------------------------------------------------------
/src/compress/table/Makefile:
--------------------------------------------------------------------------------
1 | .PHONY:clean
2 | clean:
3 | rm -f *.o
4 |
5 |
--------------------------------------------------------------------------------
/src/io/Makefile:
--------------------------------------------------------------------------------
1 | .PHONY:clean
2 | clean:
3 | rm -f *.o *.gcda *.gcno
4 |
5 |
--------------------------------------------------------------------------------
/tool/Makefile:
--------------------------------------------------------------------------------
1 | .PHONY:clean
2 | clean:
3 | rm -f *.o *.gcda *.gcno
4 |
5 |
--------------------------------------------------------------------------------
/.testdata/gov2.dat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/maropu/integer_encoding_library/HEAD/.testdata/gov2.dat
--------------------------------------------------------------------------------
/TODO:
--------------------------------------------------------------------------------
1 | TODO items
2 | -----------
3 | * See https://github.com/maropu/integer_encoding_library/issues
4 |
5 |
--------------------------------------------------------------------------------
/src/compress/Makefile:
--------------------------------------------------------------------------------
1 | .PHONY:clean
2 | clean:
3 | rm -f *.o *.gcda *.gcno
4 | $(MAKE) -C table
5 |
6 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.[oda]
2 | *.so
3 | coverage
4 | .profile
5 | *swp
6 | GPATH
7 | GRTAGS
8 | GSYMS
9 | GTAGS
10 |
--------------------------------------------------------------------------------
/src/Makefile:
--------------------------------------------------------------------------------
1 | .PHONY:clean
2 | clean:
3 | rm -f *.o *.gcda *.gcno
4 | $(MAKE) -C compress clean
5 | $(MAKE) -C io clean
6 |
7 |
--------------------------------------------------------------------------------
/.utest/gtest-1.6.0/xcode/Config/TestTarget.xcconfig:
--------------------------------------------------------------------------------
1 | //
2 | // TestTarget.xcconfig
3 | //
4 | // These are Test target settings for the gtest framework and examples. It
5 | // is set in the "Based On:" dropdown in the "Target" info dialog.
6 |
7 | PRODUCT_NAME = $(TARGET_NAME)
8 | HEADER_SEARCH_PATHS = ../include
9 |
--------------------------------------------------------------------------------
/.utest/gtest-1.6.0/xcode/Config/FrameworkTarget.xcconfig:
--------------------------------------------------------------------------------
1 | //
2 | // FrameworkTarget.xcconfig
3 | //
4 | // These are Framework target settings for the gtest framework and examples. It
5 | // is set in the "Based On:" dropdown in the "Target" info dialog.
6 | // This file is based on the Xcode Configuration files in:
7 | // http://code.google.com/p/google-toolbox-for-mac/
8 | //
9 |
10 | // Dynamic libs need to be position independent
11 | GCC_DYNAMIC_NO_PIC = NO
12 |
13 | // Dynamic libs should not have their external symbols stripped.
14 | STRIP_STYLE = non-global
15 |
16 | // Let the user install by specifying the $DSTROOT with xcodebuild
17 | SKIP_INSTALL = NO
18 |
--------------------------------------------------------------------------------
/.utest/gtest-1.6.0/xcode/Config/StaticLibraryTarget.xcconfig:
--------------------------------------------------------------------------------
1 | //
2 | // StaticLibraryTarget.xcconfig
3 | //
4 | // These are static library target settings for libgtest.a. It
5 | // is set in the "Based On:" dropdown in the "Target" info dialog.
6 | // This file is based on the Xcode Configuration files in:
7 | // http://code.google.com/p/google-toolbox-for-mac/
8 | //
9 |
10 | // Static libs can be included in bundles so make them position independent
11 | GCC_DYNAMIC_NO_PIC = NO
12 |
13 | // Static libs should not have their internal globals or external symbols
14 | // stripped.
15 | STRIP_STYLE = debugging
16 |
17 | // Let the user install by specifying the $DSTROOT with xcodebuild
18 | SKIP_INSTALL = NO
19 |
--------------------------------------------------------------------------------
/.utest/gtest-1.6.0/m4/ltversion.m4:
--------------------------------------------------------------------------------
1 | # ltversion.m4 -- version numbers -*- Autoconf -*-
2 | #
3 | # Copyright (C) 2004 Free Software Foundation, Inc.
4 | # Written by Scott James Remnant, 2004
5 | #
6 | # This file is free software; the Free Software Foundation gives
7 | # unlimited permission to copy and/or distribute it, with or without
8 | # modifications, as long as this notice is preserved.
9 |
10 | # Generated from ltversion.in.
11 |
12 | # serial 3017 ltversion.m4
13 | # This file is part of GNU Libtool
14 |
15 | m4_define([LT_PACKAGE_VERSION], [2.2.6b])
16 | m4_define([LT_PACKAGE_REVISION], [1.3017])
17 |
18 | AC_DEFUN([LTVERSION_VERSION],
19 | [macro_version='2.2.6b'
20 | macro_revision='1.3017'
21 | _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
22 | _LT_DECL(, macro_revision, 0)
23 | ])
24 |
--------------------------------------------------------------------------------
/.utest/gtest-1.6.0/xcode/Samples/FrameworkSample/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | English
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIconFile
10 |
11 | CFBundleIdentifier
12 | com.google.gtest.${PRODUCT_NAME:identifier}
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | ${PRODUCT_NAME}
17 | CFBundlePackageType
18 | FMWK
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1.0
25 | CSResourcesFileMapped
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/include/compress/policy/decDelta.hpp:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------------------
2 | * decDelta.hpp - A transformation table for Delta codes
3 | *
4 | * Coding-Style: google-styleguide
5 | * https://code.google.com/p/google-styleguide/
6 | *
7 | * Authors:
8 | * Takeshi Yamamuro
9 | * Fabrizio Silvestri
10 | * Rossano Venturini
11 | *
12 | * Copyright 2012 Integer Encoding Library
13 | * http://integerencoding.ist.cnr.it/
14 | *-----------------------------------------------------------------------------
15 | */
16 |
17 | #ifndef __DECDELTA_HPP__
18 | #define __DECDELTA_HPP__
19 |
20 | #include
21 |
22 | namespace integer_encoding {
23 | namespace internals {
24 | extern uint32_t decDelta[1 << 16];
25 | } /* namespace: internals */
26 | } /* namespace: integer_encoding */
27 |
28 | #endif /* __DECDELTA_HPP__ */
29 |
--------------------------------------------------------------------------------
/include/compress/policy/decGamma.hpp:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------------------
2 | * decGamma.hpp - A transformation table for Gamma codes
3 | *
4 | * Coding-Style: google-styleguide
5 | * https://code.google.com/p/google-styleguide/
6 | *
7 | * Authors:
8 | * Takeshi Yamamuro
9 | * Fabrizio Silvestri
10 | * Rossano Venturini
11 | *
12 | * Copyright 2012 Integer Encoding Library
13 | * http://integerencoding.ist.cnr.it/
14 | *-----------------------------------------------------------------------------
15 | */
16 |
17 | #ifndef __DECGAMMA_HPP__
18 | #define __DECGAMMA_HPP__
19 |
20 | #include
21 |
22 | namespace integer_encoding {
23 | namespace internals {
24 | extern uint32_t decGamma[1 << 16];
25 | } /* namespace: internals */
26 | } /* namespace: integer_encoding */
27 |
28 | #endif /* __DECGAMMA_HPP__ */
29 |
--------------------------------------------------------------------------------
/include/compress/policy/decUnary.hpp:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------------------
2 | * decUnary.hpp - A transformation table for Unary codes
3 | *
4 | * Coding-Style: google-styleguide
5 | * https://code.google.com/p/google-styleguide/
6 | *
7 | * Authors:
8 | * Takeshi Yamamuro
9 | * Fabrizio Silvestri
10 | * Rossano Venturini
11 | *
12 | * Copyright 2012 Integer Encoding Library
13 | * http://integerencoding.ist.cnr.it/
14 | *-----------------------------------------------------------------------------
15 | */
16 |
17 | #ifndef __DECUNARY_HPP__
18 | #define __DECUNARY_HPP__
19 |
20 | #include
21 |
22 | namespace integer_encoding {
23 | namespace internals {
24 | extern uint16_t decUnary[1 << 16];
25 | } /* namespace: internals */
26 | } /* namespace: integer_encoding */
27 |
28 | #endif /* __DECUNARY_HPP__ */
29 |
--------------------------------------------------------------------------------
/.inspection.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash --
2 |
3 | ## Build and measure the coverage with running tests
4 | CXXFLAGS='-coverage -g' make test
5 |
6 | for TEST in `find ./ -name "*_utest" -type f`; do
7 | ./$TEST
8 | done;
9 |
10 | ## Colloct test statistics
11 | which lcov
12 |
13 | if [ $? = 0 ]; then
14 | lcov --capture --directory ./ --base-directory ./ \
15 | --output-file integer_coding.info
16 | lcov --remove integer_coding.info /usr/include/\* \
17 | .utest/gtest-1.6.0/\* \
18 | --output-file integer_coding-coverage.info
19 | genhtml --title integer_coding --output-directory \
20 | ./coverage integer_coding-coverage.info
21 | fi
22 |
23 | make clean
24 |
25 | ## Code policy checker
26 | # which cpplint.py && find ./src ./tool -name '*.cpp' -type f | xargs cpplint.py
27 |
28 | ## Heap profiler
29 | # if type -P valgrind > /dev/null; then
30 | # CXXFLAGS='-g' make
31 | # valgrind --tool=massif --max-snapshots=512 \
32 | # --massif-out-file=massif.log \
33 | # ./do_something
34 | # ms_print massif.log > massif.profile
35 | # make clean
36 | # fi
37 |
38 |
--------------------------------------------------------------------------------
/.utest/gtest-1.6.0/xcode/Config/DebugProject.xcconfig:
--------------------------------------------------------------------------------
1 | //
2 | // DebugProject.xcconfig
3 | //
4 | // These are Debug Configuration project settings for the gtest framework and
5 | // examples. It is set in the "Based On:" dropdown in the "Project" info
6 | // dialog.
7 | // This file is based on the Xcode Configuration files in:
8 | // http://code.google.com/p/google-toolbox-for-mac/
9 | //
10 |
11 | #include "General.xcconfig"
12 |
13 | // No optimization
14 | GCC_OPTIMIZATION_LEVEL = 0
15 |
16 | // Deployment postprocessing is what triggers Xcode to strip, turn it off
17 | DEPLOYMENT_POSTPROCESSING = NO
18 |
19 | // Dead code stripping off
20 | DEAD_CODE_STRIPPING = NO
21 |
22 | // Debug symbols should be on obviously
23 | GCC_GENERATE_DEBUGGING_SYMBOLS = YES
24 |
25 | // Define the DEBUG macro in all debug builds
26 | OTHER_CFLAGS = $(OTHER_CFLAGS) -DDEBUG=1
27 |
28 | // These are turned off to avoid STL incompatibilities with client code
29 | // // Turns on special C++ STL checks to "encourage" good STL use
30 | // GCC_PREPROCESSOR_DEFINITIONS = $(GCC_PREPROCESSOR_DEFINITIONS) _GLIBCXX_DEBUG_PEDANTIC _GLIBCXX_DEBUG _GLIBCPP_CONCEPT_CHECKS
31 |
--------------------------------------------------------------------------------
/.utest/gtest-1.6.0/xcode/Resources/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | English
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIconFile
10 |
11 | CFBundleIdentifier
12 | com.google.${PRODUCT_NAME}
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleSignature
18 | ????
19 | CFBundleVersion
20 | GTEST_VERSIONINFO_LONG
21 | CFBundleShortVersionString
22 | GTEST_VERSIONINFO_SHORT
23 | CFBundleGetInfoString
24 | ${PRODUCT_NAME} GTEST_VERSIONINFO_LONG, ${GTEST_VERSIONINFO_ABOUT}
25 | NSHumanReadableCopyright
26 | ${GTEST_VERSIONINFO_ABOUT}
27 | CSResourcesFileMapped
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/.utest/gtest-1.6.0/xcode/Config/ReleaseProject.xcconfig:
--------------------------------------------------------------------------------
1 | //
2 | // ReleaseProject.xcconfig
3 | //
4 | // These are Release Configuration project settings for the gtest framework
5 | // and examples. It is set in the "Based On:" dropdown in the "Project" info
6 | // dialog.
7 | // This file is based on the Xcode Configuration files in:
8 | // http://code.google.com/p/google-toolbox-for-mac/
9 | //
10 |
11 | #include "General.xcconfig"
12 |
13 | // subconfig/Release.xcconfig
14 |
15 | // Optimize for space and size (Apple recommendation)
16 | GCC_OPTIMIZATION_LEVEL = s
17 |
18 | // Deploment postprocessing is what triggers Xcode to strip
19 | DEPLOYMENT_POSTPROCESSING = YES
20 |
21 | // No symbols
22 | GCC_GENERATE_DEBUGGING_SYMBOLS = NO
23 |
24 | // Dead code strip does not affect ObjC code but can help for C
25 | DEAD_CODE_STRIPPING = YES
26 |
27 | // NDEBUG is used by things like assert.h, so define it for general compat.
28 | // ASSERT going away in release tends to create unused vars.
29 | OTHER_CFLAGS = $(OTHER_CFLAGS) -DNDEBUG=1 -Wno-unused-variable
30 |
31 | // When we strip we want to strip all symbols in release, but save externals.
32 | STRIP_STYLE = all
33 |
--------------------------------------------------------------------------------
/.utest/gtest-1.6.0/xcode/Config/General.xcconfig:
--------------------------------------------------------------------------------
1 | //
2 | // General.xcconfig
3 | //
4 | // These are General configuration settings for the gtest framework and
5 | // examples.
6 | // This file is based on the Xcode Configuration files in:
7 | // http://code.google.com/p/google-toolbox-for-mac/
8 | //
9 |
10 | // Build for PPC and Intel, 32- and 64-bit
11 | ARCHS = i386 x86_64 ppc ppc64
12 |
13 | // Zerolink prevents link warnings so turn it off
14 | ZERO_LINK = NO
15 |
16 | // Prebinding considered unhelpful in 10.3 and later
17 | PREBINDING = NO
18 |
19 | // Strictest warning policy
20 | WARNING_CFLAGS = -Wall -Werror -Wendif-labels -Wnewline-eof -Wno-sign-compare -Wshadow
21 |
22 | // Work around Xcode bugs by using external strip. See:
23 | // http://lists.apple.com/archives/Xcode-users/2006/Feb/msg00050.html
24 | SEPARATE_STRIP = YES
25 |
26 | // Force C99 dialect
27 | GCC_C_LANGUAGE_STANDARD = c99
28 |
29 | // not sure why apple defaults this on, but it's pretty risky
30 | ALWAYS_SEARCH_USER_PATHS = NO
31 |
32 | // Turn on position dependent code for most cases (overridden where appropriate)
33 | GCC_DYNAMIC_NO_PIC = YES
34 |
35 | // Default SDK and minimum OS version is 10.4
36 | SDKROOT = $(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk
37 | MACOSX_DEPLOYMENT_TARGET = 10.4
38 | GCC_VERSION = 4.0
39 |
40 | // VERSIONING BUILD SETTINGS (used in Info.plist)
41 | GTEST_VERSIONINFO_ABOUT = © 2008 Google Inc.
42 |
--------------------------------------------------------------------------------
/.utest/gtest-1.6.0/CONTRIBUTORS:
--------------------------------------------------------------------------------
1 | # This file contains a list of people who've made non-trivial
2 | # contribution to the Google C++ Testing Framework project. People
3 | # who commit code to the project are encouraged to add their names
4 | # here. Please keep the list sorted by first names.
5 |
6 | Ajay Joshi
7 | Balázs Dán
8 | Bharat Mediratta
9 | Chandler Carruth
10 | Chris Prince
11 | Chris Taylor
12 | Dan Egnor
13 | Eric Roman
14 | Hady Zalek
15 | Jeffrey Yasskin
16 | Jói Sigurðsson
17 | Keir Mierle
18 | Keith Ray
19 | Kenton Varda
20 | Manuel Klimek
21 | Markus Heule
22 | Mika Raento
23 | Miklós Fazekas
24 | Pasi Valminen
25 | Patrick Hanna
26 | Patrick Riley
27 | Peter Kaminski
28 | Preston Jackson
29 | Rainer Klaffenboeck
30 | Russ Cox
31 | Russ Rufer
32 | Sean Mcafee
33 | Sigurður Ásgeirsson
34 | Tracy Bialik
35 | Vadim Berman
36 | Vlad Losev
37 | Zhanyong Wan
38 |
--------------------------------------------------------------------------------
/README:
--------------------------------------------------------------------------------
1 | An encoder/decoder collection for a sequence of integers
2 | =================
3 |
4 | Overview
5 | -----------
6 | This library is assumed to encode and decode a sequence of integers
7 | with highly positive skewness. The skewness is a distribution where
8 | the mass of the distribution is concentrated on the left, i.e., an
9 | element of the sequence is rarely a large integer. The library
10 | includes a processor-friendly fast coder, called VSEncoder, and
11 | other earlier coders for their comparisons.
12 |
13 | See a web site below to know more about the library:
14 |
15 | http://integerencoding.isti.cnr.it/
16 |
17 | NOTE: The library aims at a research tool for performance
18 | benchmarks, not a qualified product. If you would like to use
19 | portable ones, you can access a URL below:
20 |
21 | https://github.com/maropu/vpacker
22 |
23 |
24 | Prequisites
25 | -----------
26 | * gcc >= 4.3.6 (For -std=gnu++0x)
27 |
28 |
29 | License
30 | -----------
31 | Apache License, Version 2.0 http://www.apache.org/licenses/LICENSE-2.0
32 |
33 |
34 | History
35 | -----------
36 | 2012-09-28 version 0.3.0:
37 | * Code refactoring done, and unit tests added.
38 |
39 | 2012-04-03 version 0.2.0:
40 | * Release a stable version(See tag 'stable-0.2.0').
41 |
42 | 2011-11-13 version 0.1.0:
43 | * Basic functions implemented, and a first release.
44 |
45 |
46 | Authors
47 | -----------
48 | * Takeshi Yamamuro, linguin.m.s_at_gmail.com
49 | * Fabrizio Silvestri, fabrizio.silvestri_at_isti.cnr.it
50 | * Rossano Venturini, rossano.venturini_at_isti.cnr.it
51 |
52 |
--------------------------------------------------------------------------------
/.utest/gtest-1.6.0/COPYING:
--------------------------------------------------------------------------------
1 | Copyright 2008, Google Inc.
2 | All rights reserved.
3 |
4 | Redistribution and use in source and binary forms, with or without
5 | modification, are permitted provided that the following conditions are
6 | met:
7 |
8 | * Redistributions of source code must retain the above copyright
9 | notice, this list of conditions and the following disclaimer.
10 | * Redistributions in binary form must reproduce the above
11 | copyright notice, this list of conditions and the following disclaimer
12 | in the documentation and/or other materials provided with the
13 | distribution.
14 | * Neither the name of Google Inc. nor the names of its
15 | contributors may be used to endorse or promote products derived from
16 | this software without specific prior written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
--------------------------------------------------------------------------------
/include/compress/policy/VariableByte.hpp:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------------------
2 | * VariableByte.hpp - A encoder/decoder for XXXX
3 | *
4 | * Coding-Style: google-styleguide
5 | * https://code.google.com/p/google-styleguide/
6 | *
7 | * Authors:
8 | * Takeshi Yamamuro
9 | * Fabrizio Silvestri
10 | * Rossano Venturini
11 | *
12 | * Copyright 2012 Integer Encoding Library
13 | * http://integerencoding.ist.cnr.it/
14 | *-----------------------------------------------------------------------------
15 | */
16 |
17 | #ifndef __VARIABLEBYTE_HPP__
18 | #define __VARIABLEBYTE_HPP__
19 |
20 | #include
21 |
22 | #include
23 | #include
24 | #include
25 |
26 | namespace integer_encoding {
27 | namespace internals {
28 |
29 | class VariableByte : public EncodingBase {
30 | public:
31 | VariableByte() : EncodingBase(E_VARIABLEBYTE) {}
32 | ~VariableByte() throw() {}
33 |
34 | void encodeArray(const uint32_t *in,
35 | uint64_t len,
36 | uint32_t *out,
37 | uint64_t *nvalue) const;
38 |
39 | void decodeArray(const uint32_t *in,
40 | uint64_t len,
41 | uint32_t *out,
42 | uint64_t nvalue) const;
43 |
44 | uint64_t require(uint64_t len) const;
45 | }; /* VariableByte */
46 |
47 | } /* namespace: internals */
48 | } /* namespace: integer_encoding */
49 |
50 | #endif /* __VARIABLEBYTE_HPP__ */
51 |
--------------------------------------------------------------------------------
/include/compress/policy/VSE-R.hpp:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------------------
2 | * VSE-R.hpp - A alternative implementation of VSEncoding
3 | *
4 | * Coding-Style: google-styleguide
5 | * https://code.google.com/p/google-styleguide/
6 | *
7 | * Authors:
8 | * Takeshi Yamamuro
9 | * Fabrizio Silvestri
10 | * Rossano Venturini
11 | *
12 | * Copyright 2012 Integer Encoding Library
13 | * http://integerencoding.ist.cnr.it/
14 | *-----------------------------------------------------------------------------
15 | */
16 |
17 | #ifndef __VSE_R_HPP__
18 | #define __VSE_R_HPP__
19 |
20 | #include
21 |
22 | #include
23 | #include
24 | #include
25 | #include
26 | #include
27 | #include
28 |
29 | namespace integer_encoding {
30 | namespace internals {
31 |
32 | class VSE_R : public EncodingBase {
33 | public:
34 | VSE_R();
35 | ~VSE_R() throw();
36 |
37 | void encodeArray(const uint32_t *in,
38 | uint64_t len,
39 | uint32_t *out,
40 | uint64_t *nvalue) const;
41 |
42 | void decodeArray(const uint32_t *in,
43 | uint64_t len,
44 | uint32_t *out,
45 | uint64_t nvalue) const;
46 |
47 | uint64_t require(uint64_t len) const;
48 |
49 | private:
50 | std::shared_ptr wmem_;
51 | }; /* VSE_R */
52 |
53 | } /* namespace: internals */
54 | } /* namespace: integer_encoding */
55 |
56 | #endif /* __VSE_R_HPP__ */
57 |
--------------------------------------------------------------------------------
/include/compress/policy/VSEncodingBlocksHybrid.hpp:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------------------
2 | * VSEncodingBlocksHybrid.hpp - A hybrid implementation of VSEncoding
3 | *
4 | * Coding-Style: google-styleguide
5 | * https://code.google.com/p/google-styleguide/
6 | *
7 | * Authors:
8 | * Takeshi Yamamuro
9 | * Fabrizio Silvestri
10 | * Rossano Venturini
11 | *
12 | * Copyright 2012 Integer Encoding Library
13 | * http://integerencoding.ist.cnr.it/
14 | *-----------------------------------------------------------------------------
15 | */
16 |
17 | #ifndef __VSENCODINGBLOCKSHYBRID_HPP__
18 | #define __VSENCODINGBLOCKSHYBRID_HPP__
19 |
20 | #include
21 |
22 | #include
23 | #include
24 | #include
25 |
26 | namespace integer_encoding {
27 | namespace internals {
28 |
29 | const uint32_t VSEHYBRID_THRES = 4096;
30 |
31 | class VSEncodingBlocksHybrid : public EncodingBase {
32 | public:
33 | VSEncodingBlocksHybrid();
34 | ~VSEncodingBlocksHybrid() throw();
35 |
36 | void encodeArray(const uint32_t *in,
37 | uint64_t len,
38 | uint32_t *out,
39 | uint64_t *nvalue) const;
40 |
41 | void decodeArray(const uint32_t *in,
42 | uint64_t len,
43 | uint32_t *out,
44 | uint64_t nvalue) const;
45 |
46 | uint64_t require(uint64_t len) const;
47 | }; /* VSEncodingBlocksHybrid */
48 |
49 | } /* namespace: internals */
50 | } /* namespace: integer_encoding */
51 |
52 | #endif /* __VSENCODINGBLOCKSHYBRID_HPP__ */
53 |
--------------------------------------------------------------------------------
/include/compress/policy/VSEncodingNaive.hpp:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------------------
2 | * VSEncodingNaive.hpp - A naive implementation of VSEncoding
3 | *
4 | * Coding-Style: google-styleguide
5 | * https://code.google.com/p/google-styleguide/
6 | *
7 | * Authors:
8 | * Takeshi Yamamuro
9 | * Fabrizio Silvestri
10 | * Rossano Venturini
11 | *
12 | * Copyright 2012 Integer Encoding Library
13 | * http://integerencoding.ist.cnr.it/
14 | *-----------------------------------------------------------------------------
15 | */
16 |
17 | #ifndef __VSENCODINGNAIVE_HPP__
18 | #define __VSENCODINGNAIVE_HPP__
19 |
20 | #include
21 |
22 | #include
23 | #include
24 | #include
25 | #include
26 |
27 | namespace integer_encoding {
28 | namespace internals {
29 |
30 | class VSEncodingNaive : public EncodingBase {
31 | public:
32 | VSEncodingNaive();
33 | explicit VSEncodingNaive(int policy);
34 |
35 | ~VSEncodingNaive() throw();
36 |
37 | void encodeArray(const uint32_t *in,
38 | uint64_t len,
39 | uint32_t *out,
40 | uint64_t *nvalue) const;
41 |
42 | void decodeArray(const uint32_t *in,
43 | uint64_t len,
44 | uint32_t *out,
45 | uint64_t nvalue) const;
46 |
47 | uint64_t require(uint64_t len) const;
48 |
49 | private:
50 | std::shared_ptr vdp_;
51 | }; /* VSEncodingNaive */
52 |
53 | } /* namespace: internals */
54 | } /* namespace: integer_encoding */
55 |
56 | #endif /* __VSENCODINGNAIVE_HPP__ */
57 |
--------------------------------------------------------------------------------
/tool/run-perfs.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Executable file
4 | COMPRESS='vcompress'
5 |
6 | # Maximum ID to test
7 | MAXID=17
8 |
9 | # Defined suffix
10 | SUFFIX='.vc'
11 |
12 | # Length to test
13 | L='256 1024 4096 16384 65536 262144 1048576 4194304'
14 |
15 | # Mapping from name to ID
16 | declare -A M
17 |
18 | M=([0]='n-gamma' [1]='fu-gamma' [2]='f-gamma' \
19 | [3]='n-delta' [4]='fu-delta' [5]='fg-delta' \
20 | [6]='f-delta' [7]='vbyte' [8]='binypl' \
21 | [9]='simple9' [10]='simple16' [11]='p4delta' \
22 | [12]='optp4delta' [13]='vseblocks ' [14]='vse-r' \
23 | [15]='vsereset' [16]='vsehybrid' [17]='vsesimple')
24 |
25 | # Validate inputs
26 | if [ $# != 1 ]; then
27 | echo -e "Exception: irregal arguments"
28 | exit 1
29 | fi
30 |
31 | if [ ! -x ./$COMPRESS ]; then
32 | echo -e "Exception: $COMPRESS not existed"
33 | exit 1
34 | fi
35 |
36 | if [ ! -f $1 ]; then
37 | echo -e "Exception: $1 not existed"
38 | exit 1
39 | fi
40 |
41 | # Output headers
42 | echo 'Variable Length Benchmarks:'
43 | echo '/* --- Show Performance(mis) --- */'
44 |
45 | echo -en '\t'
46 | for len in $L; do
47 | echo -en '\t'
48 | echo -en $len
49 | done
50 |
51 | echo -en '\n'
52 | echo '=========================='
53 |
54 | # Run tests, output results
55 | for impl in $(seq 0 $MAXID); do
56 | # Show a type of coders to test
57 | echo -n "${M[$impl]} "
58 |
59 | for len in $L; do
60 | # Compress lists, and warm-up
61 | ./$COMPRESS $impl -n $len $1 > /dev/null || exit 1
62 | ./$COMPRESS -d $1$SUFFIX > /dev/null || exit 1
63 |
64 | # Do benchmarking
65 | ./$COMPRESS -d $1$SUFFIX > temp.output || exit 1
66 | echo -en '\t'
67 | sed -n 's/ Performance: \(.*\)mis$/\1/p' < temp.output | xargs echo -n
68 | done
69 | echo -en '\n'
70 | done
71 |
72 | echo -en '\n'
73 |
74 | # Remove
75 | rm -rf temp.output
76 | rm -rf $1.*
77 |
78 |
--------------------------------------------------------------------------------
/include/compress/policy/OPTPForDelta.hpp:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------------------
2 | * OPTPForDelta.cpp - A optimized implementation of PForDelta
3 | * This implementation made by these authors based on a paper below:
4 | * - http://dl.acm.org/citation.cfm?id=1526764
5 | * And, some potions fo this code are optimized by means of a code given
6 | * by Shuai Ding, who is of original authors proposing OPTPForDelta.
7 | *
8 | * Coding-Style: google-styleguide
9 | * https://code.google.com/p/google-styleguide/
10 | *
11 | * Authors:
12 | * Takeshi Yamamuro
13 | * Fabrizio Silvestri
14 | * Rossano Venturini
15 | *
16 | * Copyright 2012 Integer Encoding Library
17 | * http://integerencoding.ist.cnr.it/
18 | *-----------------------------------------------------------------------------
19 | */
20 |
21 | #ifndef __OPTPFORDELTA_HPP__
22 | #define __OPTPFORDELTA_HPP__
23 |
24 | #include
25 | #include
26 |
27 | namespace integer_encoding {
28 | namespace internals {
29 |
30 | class OPTPForDelta : public PForDelta {
31 | public:
32 | OPTPForDelta();
33 | ~OPTPForDelta() throw();
34 |
35 | uint64_t require(uint64_t len) const;
36 |
37 | private:
38 | /*
39 | * Two functions below are intended to
40 | * be overloaded in OPTPForDelta.
41 | */
42 | uint32_t tryB(uint32_t b,
43 | const uint32_t *in,
44 | uint64_t len) const;
45 | uint32_t findBestB(const uint32_t *in,
46 | uint64_t len) const;
47 | }; /* OPTPForDelta */
48 |
49 | } /* namespace: internals */
50 | } /* namespace: integer_encoding */
51 |
52 | #endif /* __OPTPFORDELTA_HPP__ */
53 |
--------------------------------------------------------------------------------
/.utest/gtest-1.6.0/test/production.cc:
--------------------------------------------------------------------------------
1 | // Copyright 2006, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // Author: wan@google.com (Zhanyong Wan)
31 | //
32 | // This is part of the unit test for include/gtest/gtest_prod.h.
33 |
34 | #include "production.h"
35 |
36 | PrivateCode::PrivateCode() : x_(0) {}
37 |
--------------------------------------------------------------------------------
/include/compress/policy/N_Delta.hpp:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------------------
2 | * N_Delta.hpp - A encoder/decoder for naive Delta
3 | *
4 | * Coding-Style: google-styleguide
5 | * https://code.google.com/p/google-styleguide/
6 | *
7 | * Authors:
8 | * Takeshi Yamamuro
9 | * Fabrizio Silvestri
10 | * Rossano Venturini
11 | *
12 | * Copyright 2012 Integer Encoding Library
13 | * http://integerencoding.ist.cnr.it/
14 | *-----------------------------------------------------------------------------
15 | */
16 |
17 | #ifndef __N_DELTA_HPP__
18 | #define __N_DELTA_HPP__
19 |
20 | #include
21 |
22 | #include
23 | #include
24 | #include
25 |
26 | namespace integer_encoding {
27 | namespace internals {
28 |
29 | class N_Delta : public EncodingBase {
30 | public:
31 | N_Delta() : EncodingBase(E_N_DELTA) {}
32 | ~N_Delta() throw() {}
33 |
34 | void encodeArray(const uint32_t *in,
35 | uint64_t len,
36 | uint32_t *out,
37 | uint64_t *nvalue) const {
38 | BitsWriter wt(out, *nvalue);
39 | *nvalue = wt.deltaArray(in, len);
40 | }
41 |
42 | uint64_t require(uint64_t len) const {
43 | /* Delta needs 42-bit for UINT32_MAX */
44 | return (42 * len) >> 5;
45 | }
46 |
47 | void decodeArray(const uint32_t *in,
48 | uint64_t len,
49 | uint32_t *out,
50 | uint64_t nvalue) const {
51 | BitsReader rd(in, len);
52 | rd.ndeltaArray(out, nvalue);
53 | }
54 | }; /* N_Delta */
55 |
56 | } /* namespace: internals */
57 | } /* namespace: integer_encoding */
58 |
59 | #endif /* __N_DELTA_HPP__ */
60 |
--------------------------------------------------------------------------------
/include/compress/policy/N_Gamma.hpp:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------------------
2 | * N_Gamma.hpp - A encoder/decoder for naive Gamma
3 | *
4 | * Coding-Style: google-styleguide
5 | * https://code.google.com/p/google-styleguide/
6 | *
7 | * Authors:
8 | * Takeshi Yamamuro
9 | * Fabrizio Silvestri
10 | * Rossano Venturini
11 | *
12 | * Copyright 2012 Integer Encoding Library
13 | * http://integerencoding.ist.cnr.it/
14 | *-----------------------------------------------------------------------------
15 | */
16 |
17 | #ifndef __N_GAMMA_HPP__
18 | #define __N_GAMMA_HPP__
19 |
20 | #include
21 |
22 | #include
23 | #include
24 | #include
25 |
26 | namespace integer_encoding {
27 | namespace internals {
28 |
29 | class N_Gamma : public EncodingBase {
30 | public:
31 | N_Gamma() : EncodingBase(E_N_GAMMA) {}
32 | ~N_Gamma() throw() {}
33 |
34 | void encodeArray(const uint32_t *in,
35 | uint64_t len,
36 | uint32_t *out,
37 | uint64_t *nvalue) const {
38 | BitsWriter wt(out, *nvalue);
39 | *nvalue = wt.gammaArray(in, len);
40 | }
41 |
42 | uint64_t require(uint64_t len) const {
43 | /* Gamma needs 64-bit for UINT32_MAX */
44 | return (64 * len) >> 5;
45 | }
46 |
47 | void decodeArray(const uint32_t *in,
48 | uint64_t len,
49 | uint32_t *out,
50 | uint64_t nvalue) const {
51 | BitsReader rd(in, len);
52 | rd.ngammaArray(out, nvalue);
53 | }
54 | }; /* N_Gamma */
55 |
56 | } /* namespace: internals */
57 | } /* namespace: integer_encoding */
58 |
59 | #endif /* __N_GAMMA_HPP__ */
60 |
--------------------------------------------------------------------------------
/include/compress/policy/F_Delta.hpp:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------------------
2 | * F_Delta.hpp - A encoder/decoder for Delta alternatives
3 | *
4 | * Coding-Style: google-styleguide
5 | * https://code.google.com/p/google-styleguide/
6 | *
7 | * Authors:
8 | * Takeshi Yamamuro
9 | * Fabrizio Silvestri
10 | * Rossano Venturini
11 | *
12 | * Copyright 2012 Integer Encoding Library
13 | * http://integerencoding.ist.cnr.it/
14 | *-----------------------------------------------------------------------------
15 | */
16 |
17 | #ifndef __F_DELTA_HPP__
18 | #define __F_DELTA_HPP__
19 |
20 | #include
21 |
22 | #include
23 | #include
24 | #include
25 |
26 | namespace integer_encoding {
27 | namespace internals {
28 |
29 | class F_Delta : public EncodingBase {
30 | public:
31 | F_Delta() : EncodingBase(E_F_DELTA) {}
32 | ~F_Delta() throw() {}
33 |
34 | void encodeArray(const uint32_t *in,
35 | uint64_t len,
36 | uint32_t *out,
37 | uint64_t *nvalue) const {
38 | BitsWriter wt(out, *nvalue);
39 | *nvalue = wt.deltaArray(in, len);
40 | }
41 |
42 | uint64_t require(uint64_t len) const {
43 | /* Delta needs 42-bit for UINT32_MAX */
44 | return (42 * len) >> 5;
45 | }
46 |
47 | void decodeArray(const uint32_t *in,
48 | uint64_t len,
49 | uint32_t *out,
50 | uint64_t nvalue) const {
51 | BitsReader rd(in, len);
52 | rd.fdeltaArray(out, nvalue);
53 | }
54 | }; /* F_Delta */
55 |
56 | } /* namespace: internals */
57 | } /* namespace: integer_encoding */
58 |
59 | #endif /* __F_DELTA_HPP__ */
60 |
--------------------------------------------------------------------------------
/include/compress/policy/F_Gamma.hpp:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------------------
2 | * F_Gamma.hpp - A encoder/decoder for Gamma alternatives
3 | *
4 | * Coding-Style: google-styleguide
5 | * https://code.google.com/p/google-styleguide/
6 | *
7 | * Authors:
8 | * Takeshi Yamamuro
9 | * Fabrizio Silvestri
10 | * Rossano Venturini
11 | *
12 | * Copyright 2012 Integer Encoding Library
13 | * http://integerencoding.ist.cnr.it/
14 | *-----------------------------------------------------------------------------
15 | */
16 |
17 | #ifndef __F_GAMMA_HPP__
18 | #define __F_GAMMA_HPP__
19 |
20 | #include
21 |
22 | #include
23 | #include
24 | #include
25 |
26 | namespace integer_encoding {
27 | namespace internals {
28 |
29 | class F_Gamma : public EncodingBase {
30 | public:
31 | F_Gamma() : EncodingBase(E_F_GAMMA) {}
32 | ~F_Gamma() throw() {}
33 |
34 | void encodeArray(const uint32_t *in,
35 | uint64_t len,
36 | uint32_t *out,
37 | uint64_t *nvalue) const {
38 | BitsWriter wt(out, *nvalue);
39 | *nvalue = wt.gammaArray(in, len);
40 | }
41 |
42 | uint64_t require(uint64_t len) const {
43 | /* Gamma needs 64-bit for UINT32_MAX */
44 | return (64 * len) >> 5;
45 | }
46 |
47 | void decodeArray(const uint32_t *in,
48 | uint64_t len,
49 | uint32_t *out,
50 | uint64_t nvalue) const {
51 | BitsReader rd(in, len);
52 | rd.fgammaArray(out, nvalue);
53 | }
54 | }; /* F_Gamma */
55 |
56 | } /* namespace: internals */
57 | } /* namespace: integer_encoding */
58 |
59 | #endif /* __F_GAMMA_HPP__ */
60 |
--------------------------------------------------------------------------------
/include/compress/policy/FG_Delta.hpp:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------------------
2 | * FG_Delta.hpp - A encoder/decoder for naive Delta
3 | *
4 | * Coding-Style: google-styleguide
5 | * https://code.google.com/p/google-styleguide/
6 | *
7 | * Authors:
8 | * Takeshi Yamamuro
9 | * Fabrizio Silvestri
10 | * Rossano Venturini
11 | *
12 | * Copyright 2012 Integer Encoding Library
13 | * http://integerencoding.ist.cnr.it/
14 | *-----------------------------------------------------------------------------
15 | */
16 |
17 | #ifndef __FG_DELTA_HPP__
18 | #define __FG_DELTA_HPP__
19 |
20 | #include
21 |
22 | #include
23 | #include
24 | #include
25 |
26 | namespace integer_encoding {
27 | namespace internals {
28 |
29 | class FG_Delta : public EncodingBase {
30 | public:
31 | FG_Delta() : EncodingBase(E_FG_DELTA) {}
32 | ~FG_Delta() throw() {}
33 |
34 | void encodeArray(const uint32_t *in,
35 | uint64_t len,
36 | uint32_t *out,
37 | uint64_t *nvalue) const {
38 | BitsWriter wt(out, *nvalue);
39 | *nvalue = wt.deltaArray(in, len);
40 | }
41 |
42 | uint64_t require(uint64_t len) const {
43 | /* Delta needs 42-bit for UINT32_MAX */
44 | return (42 * len) >> 5;
45 | }
46 |
47 | void decodeArray(const uint32_t *in,
48 | uint64_t len,
49 | uint32_t *out,
50 | uint64_t nvalue) const {
51 | BitsReader rd(in, len);
52 | rd.fgdeltaArray(out, nvalue);
53 | }
54 | }; /* FG_Delta */
55 |
56 | } /* namespace: internals */
57 | } /* namespace: integer_encoding */
58 |
59 | #endif /* __FG_DELTA_HPP__ */
60 |
--------------------------------------------------------------------------------
/include/compress/policy/FU_Delta.hpp:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------------------
2 | * FU_Delta.hpp - A encoder/decoder for naive Delta
3 | *
4 | * Coding-Style: google-styleguide
5 | * https://code.google.com/p/google-styleguide/
6 | *
7 | * Authors:
8 | * Takeshi Yamamuro
9 | * Fabrizio Silvestri
10 | * Rossano Venturini
11 | *
12 | * Copyright 2012 Integer Encoding Library
13 | * http://integerencoding.ist.cnr.it/
14 | *-----------------------------------------------------------------------------
15 | */
16 |
17 | #ifndef __FU_DELTA_HPP__
18 | #define __FU_DELTA_HPP__
19 |
20 | #include
21 |
22 | #include
23 | #include
24 | #include
25 |
26 | namespace integer_encoding {
27 | namespace internals {
28 |
29 | class FU_Delta : public EncodingBase {
30 | public:
31 | FU_Delta() : EncodingBase(E_FU_DELTA) {}
32 | ~FU_Delta() throw() {}
33 |
34 | void encodeArray(const uint32_t *in,
35 | uint64_t len,
36 | uint32_t *out,
37 | uint64_t *nvalue) const {
38 | BitsWriter wt(out, *nvalue);
39 | *nvalue = wt.deltaArray(in, len);
40 | }
41 |
42 | uint64_t require(uint64_t len) const {
43 | /* Delta needs 42-bit for UINT32_MAX */
44 | return (42 * len) >> 5;
45 | }
46 |
47 | void decodeArray(const uint32_t *in,
48 | uint64_t len,
49 | uint32_t *out,
50 | uint64_t nvalue) const {
51 | BitsReader rd(in, len);
52 | rd.fudeltaArray(out, nvalue);
53 | }
54 | }; /* FU_Delta */
55 |
56 | } /* namespace: internals */
57 | } /* namespace: integer_encoding */
58 |
59 | #endif /* __FU_DELTA_HPP__ */
60 |
--------------------------------------------------------------------------------
/include/compress/policy/FU_Gamma.hpp:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------------------
2 | * FU_Gamma.hpp - A encoder/decoder for Gamma alternatives
3 | *
4 | * Coding-Style: google-styleguide
5 | * https://code.google.com/p/google-styleguide/
6 | *
7 | * Authors:
8 | * Takeshi Yamamuro
9 | * Fabrizio Silvestri
10 | * Rossano Venturini
11 | *
12 | * Copyright 2012 Integer Encoding Library
13 | * http://integerencoding.ist.cnr.it/
14 | *-----------------------------------------------------------------------------
15 | */
16 |
17 | #ifndef __FU_GAMMA_HPP__
18 | #define __FU_GAMMA_HPP__
19 |
20 | #include
21 |
22 | #include
23 | #include
24 | #include
25 |
26 | namespace integer_encoding {
27 | namespace internals {
28 |
29 | class FU_Gamma : public EncodingBase {
30 | public:
31 | FU_Gamma() : EncodingBase(E_FU_GAMMA) {}
32 | ~FU_Gamma() throw() {}
33 |
34 | void encodeArray(const uint32_t *in,
35 | uint64_t len,
36 | uint32_t *out,
37 | uint64_t *nvalue) const {
38 | BitsWriter wt(out, *nvalue);
39 | *nvalue = wt.gammaArray(in, len);
40 | }
41 |
42 | uint64_t require(uint64_t len) const {
43 | /* Gamma needs 64-bit for UINT32_MAX */
44 | return (64 * len) >> 5;
45 | }
46 |
47 | void decodeArray(const uint32_t *in,
48 | uint64_t len,
49 | uint32_t *out,
50 | uint64_t nvalue) const {
51 | BitsReader rd(in, len);
52 | rd.fugammaArray(out, nvalue);
53 | }
54 | }; /* FU_Gamma */
55 |
56 | } /* namespace: internals */
57 | } /* namespace: integer_encoding */
58 |
59 | #endif /* __FU_GAMMA_HPP__ */
60 |
--------------------------------------------------------------------------------
/.utest/gtest-1.6.0/src/gtest_main.cc:
--------------------------------------------------------------------------------
1 | // Copyright 2006, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | #include
31 |
32 | #include "gtest/gtest.h"
33 |
34 | GTEST_API_ int main(int argc, char **argv) {
35 | std::cout << "Running main() from gtest_main.cc\n";
36 |
37 | testing::InitGoogleTest(&argc, argv);
38 | return RUN_ALL_TESTS();
39 | }
40 |
--------------------------------------------------------------------------------
/.utest/gtest-1.6.0/fused-src/gtest/gtest_main.cc:
--------------------------------------------------------------------------------
1 | // Copyright 2006, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | #include
31 |
32 | #include "gtest/gtest.h"
33 |
34 | GTEST_API_ int main(int argc, char **argv) {
35 | std::cout << "Running main() from gtest_main.cc\n";
36 |
37 | testing::InitGoogleTest(&argc, argv);
38 | return RUN_ALL_TESTS();
39 | }
40 |
--------------------------------------------------------------------------------
/include/integer_encoding.hpp:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------------------
2 | * integer_encoding.hpp - A header for encoder/decoder collections
3 | *
4 | * Coding-Style: google-styleguide
5 | * https://code.google.com/p/google-styleguide/
6 | *
7 | * Authors:
8 | * Takeshi Yamamuro
9 | * Fabrizio Silvestri
10 | * Rossano Venturini
11 | *
12 | * Copyright 2012 Integer Encoding Library
13 | * http://integerencoding.ist.cnr.it/
14 | *-----------------------------------------------------------------------------
15 | */
16 |
17 | #ifndef __INTEGER_ENCODING_HPP__
18 | #define __INTEGER_ENCODING_HPP__
19 |
20 | #include
21 |
22 | /* Implemented encoders/decoders */
23 | #include
24 | #include
25 | #include
26 | #include
27 | #include
28 | #include
29 | #include
30 | #include
31 | #include
32 | #include
33 | #include
34 | #include
35 | #include
36 | #include
37 | #include
38 | #include
39 | #include
40 | #include
41 | #include
42 |
43 | namespace integer_encoding {
44 |
45 | class EncodingFactory {
46 | public:
47 | static EncodingPtr create(const int policy);
48 | };
49 |
50 | } /* namespace: integer_encoding */
51 |
52 | #endif /* __INTEGER_ENCODING_HPP__ */
53 |
--------------------------------------------------------------------------------
/.utest/gtest-1.6.0/codegear/gtest_all.cc:
--------------------------------------------------------------------------------
1 | // Copyright 2009, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // Author: Josh Kelley (joshkel@gmail.com)
31 | //
32 | // Google C++ Testing Framework (Google Test)
33 | //
34 | // C++Builder's IDE cannot build a static library from files with hyphens
35 | // in their name. See http://qc.codegear.com/wc/qcmain.aspx?d=70977 .
36 | // This file serves as a workaround.
37 |
38 | #include "src/gtest-all.cc"
39 |
--------------------------------------------------------------------------------
/include/compress/policy/VSEncodingRest.hpp:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------------------
2 | * VSEncodingRest.hpp - A implementation of optimized VSEncoding
3 | *
4 | * Coding-Style: google-styleguide
5 | * https://code.google.com/p/google-styleguide/
6 | *
7 | * Authors:
8 | * Takeshi Yamamuro
9 | * Fabrizio Silvestri
10 | * Rossano Venturini
11 | *
12 | * Copyright 2012 Integer Encoding Library
13 | * http://integerencoding.ist.cnr.it/
14 | *-----------------------------------------------------------------------------
15 | */
16 |
17 | #ifndef __VSENCODINGREST_HPP__
18 | #define __VSENCODINGREST_HPP__
19 |
20 | #include
21 |
22 | #include
23 | #include
24 | #include
25 |
26 | namespace integer_encoding {
27 | namespace internals {
28 |
29 | class VSEncodingRest : public EncodingBase {
30 | public:
31 | VSEncodingRest();
32 | explicit VSEncodingRest(int policy);
33 |
34 | ~VSEncodingRest() throw();
35 |
36 | void encodeArray(const uint32_t *in,
37 | uint64_t len,
38 | uint32_t *out,
39 | uint64_t *nvalue) const;
40 |
41 | void decodeArray(const uint32_t *in,
42 | uint64_t len,
43 | uint32_t *out,
44 | uint64_t nvalue) const;
45 |
46 | /* FIXME: VSEncodingRest rewrites its own input integers */
47 | void decodeArray(uint32_t *in,
48 | uint64_t len,
49 | uint32_t *out,
50 | uint64_t nvalue) const;
51 |
52 | uint64_t require(uint64_t len) const;
53 |
54 | private:
55 | std::shared_ptr vdp_;
56 | }; /* VSEncodingRest */
57 |
58 | } /* namespace: internals */
59 | } /* namespace: integer_encoding */
60 |
61 | #endif /* __VSENCODINGREST_HPP__ */
62 |
--------------------------------------------------------------------------------
/include/io/BitsWriter.hpp:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------------------
2 | * BitsWriter.hpp - A write interface for a sequence of bits
3 | *
4 | * Coding-Style: google-styleguide
5 | * https://code.google.com/p/google-styleguide/
6 | *
7 | * Authors:
8 | * Takeshi Yamamuro
9 | * Fabrizio Silvestri
10 | * Rossano Venturini
11 | *
12 | * Copyright 2012 Integer Encoding Library
13 | * http://integerencoding.ist.cnr.it/
14 | *-----------------------------------------------------------------------------
15 | */
16 |
17 | #ifndef __BITSWRITER_HPP__
18 | #define __BITSWRITER_HPP__
19 |
20 | #include
21 |
22 | namespace integer_encoding {
23 | namespace internals {
24 |
25 | class BitsWriter {
26 | public:
27 | explicit BitsWriter(uint32_t *out, uint64_t len);
28 | ~BitsWriter() throw();
29 |
30 | void write_bits(uint32_t val, uint32_t num);
31 | void flush_bits();
32 |
33 | uint32_t *pos() const;
34 | uint64_t size() const;
35 |
36 | uint32_t gammaArray(const uint32_t *in,
37 | uint64_t len);
38 | uint32_t deltaArray(const uint32_t *in,
39 | uint64_t len);
40 |
41 | /* Binary Interpolative only supports 32-bit */
42 | void intrpolatvArray(const uint32_t *in,
43 | uint32_t len,
44 | uint32_t offset,
45 | uint32_t low, uint32_t high);
46 |
47 | private:
48 | void write_unary(uint32_t val);
49 | void write_gamma(uint32_t val);
50 | void write_intrpolatv(uint32_t val, uint32_t intvl);
51 |
52 | uint32_t *out_;
53 | uint32_t *term_;
54 | uint64_t buffer_;
55 | uint32_t fill_;
56 | uint64_t nwritten_;
57 |
58 | DISALLOW_COPY_AND_ASSIGN(BitsWriter);
59 | }; /* BitsWriter */
60 |
61 | } /* namespace: internals */
62 | } /* namespace: integer_encoding */
63 |
64 | #endif /* __BITSWRITER_HPP__ */
65 |
--------------------------------------------------------------------------------
/.utest/gtest-1.6.0/scripts/test/Makefile:
--------------------------------------------------------------------------------
1 | # A Makefile for fusing Google Test and building a sample test against it.
2 | #
3 | # SYNOPSIS:
4 | #
5 | # make [all] - makes everything.
6 | # make TARGET - makes the given target.
7 | # make check - makes everything and runs the built sample test.
8 | # make clean - removes all files generated by make.
9 |
10 | # Points to the root of fused Google Test, relative to where this file is.
11 | FUSED_GTEST_DIR = output
12 |
13 | # Paths to the fused gtest files.
14 | FUSED_GTEST_H = $(FUSED_GTEST_DIR)/gtest/gtest.h
15 | FUSED_GTEST_ALL_CC = $(FUSED_GTEST_DIR)/gtest/gtest-all.cc
16 |
17 | # Where to find the sample test.
18 | SAMPLE_DIR = ../../samples
19 |
20 | # Where to find gtest_main.cc.
21 | GTEST_MAIN_CC = ../../src/gtest_main.cc
22 |
23 | # Flags passed to the preprocessor.
24 | # We have no idea here whether pthreads is available in the system, so
25 | # disable its use.
26 | CPPFLAGS += -I$(FUSED_GTEST_DIR) -DGTEST_HAS_PTHREAD=0
27 |
28 | # Flags passed to the C++ compiler.
29 | CXXFLAGS += -g
30 |
31 | all : sample1_unittest
32 |
33 | check : all
34 | ./sample1_unittest
35 |
36 | clean :
37 | rm -rf $(FUSED_GTEST_DIR) sample1_unittest *.o
38 |
39 | $(FUSED_GTEST_H) :
40 | ../fuse_gtest_files.py $(FUSED_GTEST_DIR)
41 |
42 | $(FUSED_GTEST_ALL_CC) :
43 | ../fuse_gtest_files.py $(FUSED_GTEST_DIR)
44 |
45 | gtest-all.o : $(FUSED_GTEST_H) $(FUSED_GTEST_ALL_CC)
46 | $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(FUSED_GTEST_DIR)/gtest/gtest-all.cc
47 |
48 | gtest_main.o : $(FUSED_GTEST_H) $(GTEST_MAIN_CC)
49 | $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(GTEST_MAIN_CC)
50 |
51 | sample1.o : $(SAMPLE_DIR)/sample1.cc $(SAMPLE_DIR)/sample1.h
52 | $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(SAMPLE_DIR)/sample1.cc
53 |
54 | sample1_unittest.o : $(SAMPLE_DIR)/sample1_unittest.cc \
55 | $(SAMPLE_DIR)/sample1.h $(FUSED_GTEST_H)
56 | $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(SAMPLE_DIR)/sample1_unittest.cc
57 |
58 | sample1_unittest : sample1.o sample1_unittest.o gtest-all.o gtest_main.o
59 | $(CXX) $(CPPFLAGS) $(CXXFLAGS) $^ -o $@
60 |
--------------------------------------------------------------------------------
/.utest/gtest-1.6.0/test/gtest_main_unittest.cc:
--------------------------------------------------------------------------------
1 | // Copyright 2006, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // Author: wan@google.com (Zhanyong Wan)
31 |
32 | #include "gtest/gtest.h"
33 |
34 | // Tests that we don't have to define main() when we link to
35 | // gtest_main instead of gtest.
36 |
37 | namespace {
38 |
39 | TEST(GTestMainTest, ShouldSucceed) {
40 | }
41 |
42 | } // namespace
43 |
44 | // We are using the main() function defined in src/gtest_main.cc, so
45 | // we don't define it here.
46 |
--------------------------------------------------------------------------------
/.utest/gtest-1.6.0/samples/sample4_unittest.cc:
--------------------------------------------------------------------------------
1 | // Copyright 2005, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // Author: wan@google.com (Zhanyong Wan)
31 |
32 | #include "gtest/gtest.h"
33 | #include "sample4.h"
34 |
35 | // Tests the Increment() method.
36 | TEST(Counter, Increment) {
37 | Counter c;
38 |
39 | // EXPECT_EQ() evaluates its arguments exactly once, so they
40 | // can have side effects.
41 |
42 | EXPECT_EQ(0, c.Increment());
43 | EXPECT_EQ(1, c.Increment());
44 | EXPECT_EQ(2, c.Increment());
45 | }
46 |
--------------------------------------------------------------------------------
/.utest/gtest-1.6.0/samples/sample1.h:
--------------------------------------------------------------------------------
1 | // Copyright 2005, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | // A sample program demonstrating using Google C++ testing framework.
31 | //
32 | // Author: wan@google.com (Zhanyong Wan)
33 |
34 | #ifndef GTEST_SAMPLES_SAMPLE1_H_
35 | #define GTEST_SAMPLES_SAMPLE1_H_
36 |
37 | // Returns n! (the factorial of n). For negative n, n! is defined to be 1.
38 | int Factorial(int n);
39 |
40 | // Returns true iff n is a prime number.
41 | bool IsPrime(int n);
42 |
43 | #endif // GTEST_SAMPLES_SAMPLE1_H_
44 |
--------------------------------------------------------------------------------
/.utest/gtest-1.6.0/test/gtest_uninitialized_test_.cc:
--------------------------------------------------------------------------------
1 | // Copyright 2008, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // Author: wan@google.com (Zhanyong Wan)
31 |
32 | #include "gtest/gtest.h"
33 |
34 | TEST(DummyTest, Dummy) {
35 | // This test doesn't verify anything. We just need it to create a
36 | // realistic stage for testing the behavior of Google Test when
37 | // RUN_ALL_TESTS() is called without testing::InitGoogleTest() being
38 | // called first.
39 | }
40 |
41 | int main() {
42 | return RUN_ALL_TESTS();
43 | }
44 |
--------------------------------------------------------------------------------
/.utest/gtest-1.6.0/samples/sample4.cc:
--------------------------------------------------------------------------------
1 | // Copyright 2005, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | // A sample program demonstrating using Google C++ testing framework.
31 | //
32 | // Author: wan@google.com (Zhanyong Wan)
33 |
34 | #include
35 |
36 | #include "sample4.h"
37 |
38 | // Returns the current counter value, and increments it.
39 | int Counter::Increment() {
40 | return counter_++;
41 | }
42 |
43 | // Prints the current counter value to STDOUT.
44 | void Counter::Print() const {
45 | printf("%d", counter_);
46 | }
47 |
--------------------------------------------------------------------------------
/.utest/gtest-1.6.0/build-aux/config.h.in:
--------------------------------------------------------------------------------
1 | /* build-aux/config.h.in. Generated from configure.ac by autoheader. */
2 |
3 | /* Define to 1 if you have the header file. */
4 | #undef HAVE_DLFCN_H
5 |
6 | /* Define to 1 if you have the header file. */
7 | #undef HAVE_INTTYPES_H
8 |
9 | /* Define to 1 if you have the header file. */
10 | #undef HAVE_MEMORY_H
11 |
12 | /* Define if you have POSIX threads libraries and header files. */
13 | #undef HAVE_PTHREAD
14 |
15 | /* Define to 1 if you have the header file. */
16 | #undef HAVE_STDINT_H
17 |
18 | /* Define to 1 if you have the header file. */
19 | #undef HAVE_STDLIB_H
20 |
21 | /* Define to 1 if you have the header file. */
22 | #undef HAVE_STRINGS_H
23 |
24 | /* Define to 1 if you have the header file. */
25 | #undef HAVE_STRING_H
26 |
27 | /* Define to 1 if you have the header file. */
28 | #undef HAVE_SYS_STAT_H
29 |
30 | /* Define to 1 if you have the header file. */
31 | #undef HAVE_SYS_TYPES_H
32 |
33 | /* Define to 1 if you have the header file. */
34 | #undef HAVE_UNISTD_H
35 |
36 | /* Define to the sub-directory in which libtool stores uninstalled libraries.
37 | */
38 | #undef LT_OBJDIR
39 |
40 | /* Name of package */
41 | #undef PACKAGE
42 |
43 | /* Define to the address where bug reports for this package should be sent. */
44 | #undef PACKAGE_BUGREPORT
45 |
46 | /* Define to the full name of this package. */
47 | #undef PACKAGE_NAME
48 |
49 | /* Define to the full name and version of this package. */
50 | #undef PACKAGE_STRING
51 |
52 | /* Define to the one symbol short name of this package. */
53 | #undef PACKAGE_TARNAME
54 |
55 | /* Define to the home page for this package. */
56 | #undef PACKAGE_URL
57 |
58 | /* Define to the version of this package. */
59 | #undef PACKAGE_VERSION
60 |
61 | /* Define to necessary symbol if this constant uses a non-standard name on
62 | your system. */
63 | #undef PTHREAD_CREATE_JOINABLE
64 |
65 | /* Define to 1 if you have the ANSI C header files. */
66 | #undef STDC_HEADERS
67 |
68 | /* Version number of package */
69 | #undef VERSION
70 |
--------------------------------------------------------------------------------
/include/compress/policy/VSEncodingBlocks.hpp:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------------------
2 | * VSEncodingBlocks.hpp - A original and simple implementation of VSEncoding
3 | *
4 | * Coding-Style: google-styleguide
5 | * https://code.google.com/p/google-styleguide/
6 | *
7 | * Authors:
8 | * Takeshi Yamamuro
9 | * Fabrizio Silvestri
10 | * Rossano Venturini
11 | *
12 | * Copyright 2012 Integer Encoding Library
13 | * http://integerencoding.ist.cnr.it/
14 | *-----------------------------------------------------------------------------
15 | */
16 |
17 | #ifndef __VSENCODINGBLOCKS_HPP__
18 | #define __VSENCODINGBLOCKS_HPP__
19 |
20 | #include
21 |
22 | #include
23 | #include
24 | #include
25 |
26 | namespace integer_encoding {
27 | namespace internals {
28 |
29 | class VSEncodingBlocks : public EncodingBase {
30 | public:
31 | VSEncodingBlocks();
32 | ~VSEncodingBlocks() throw();
33 |
34 | void encodeArray(const uint32_t *in,
35 | uint64_t len,
36 | uint32_t *out,
37 | uint64_t *nvalue) const;
38 |
39 | void decodeArray(const uint32_t *in,
40 | uint64_t len,
41 | uint32_t *out,
42 | uint64_t nvalue) const;
43 |
44 | uint64_t require(uint64_t len) const;
45 |
46 | private:
47 | void encodeVS(const uint32_t *in,
48 | uint32_t len,
49 | uint32_t *out,
50 | uint32_t *size) const;
51 | void decodeVS(const uint32_t *in,
52 | uint32_t len,
53 | uint32_t *out,
54 | uint32_t nvalue) const;
55 |
56 | std::shared_ptr wmem_;
57 | std::shared_ptr vdp_;
58 | }; /* VSEncodingBlocks */
59 |
60 | } /* namespace: internals */
61 | } /* namespace: integer_encoding */
62 |
63 | #endif /* __VSENCODINGBLOCKS_HPP__ */
64 |
--------------------------------------------------------------------------------
/.utest/gtest-1.6.0/codegear/gtest_link.cc:
--------------------------------------------------------------------------------
1 | // Copyright 2009, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // Author: Josh Kelley (joshkel@gmail.com)
31 | //
32 | // Google C++ Testing Framework (Google Test)
33 | //
34 | // Links gtest.lib and gtest_main.lib into the current project in C++Builder.
35 | // This means that these libraries can't be renamed, but it's the only way to
36 | // ensure that Debug versus Release test builds are linked against the
37 | // appropriate Debug or Release build of the libraries.
38 |
39 | #pragma link "gtest.lib"
40 | #pragma link "gtest_main.lib"
41 |
--------------------------------------------------------------------------------
/.utest/gtest-1.6.0/test/gtest_xml_outfile1_test_.cc:
--------------------------------------------------------------------------------
1 | // Copyright 2008, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // Author: keith.ray@gmail.com (Keith Ray)
31 | //
32 | // gtest_xml_outfile1_test_ writes some xml via TestProperty used by
33 | // gtest_xml_outfiles_test.py
34 |
35 | #include "gtest/gtest.h"
36 |
37 | class PropertyOne : public testing::Test {
38 | protected:
39 | virtual void SetUp() {
40 | RecordProperty("SetUpProp", 1);
41 | }
42 | virtual void TearDown() {
43 | RecordProperty("TearDownProp", 1);
44 | }
45 | };
46 |
47 | TEST_F(PropertyOne, TestSomeProperties) {
48 | RecordProperty("TestSomeProperty", 1);
49 | }
50 |
--------------------------------------------------------------------------------
/.utest/gtest-1.6.0/test/gtest_xml_outfile2_test_.cc:
--------------------------------------------------------------------------------
1 | // Copyright 2008, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // Author: keith.ray@gmail.com (Keith Ray)
31 | //
32 | // gtest_xml_outfile2_test_ writes some xml via TestProperty used by
33 | // gtest_xml_outfiles_test.py
34 |
35 | #include "gtest/gtest.h"
36 |
37 | class PropertyTwo : public testing::Test {
38 | protected:
39 | virtual void SetUp() {
40 | RecordProperty("SetUpProp", 2);
41 | }
42 | virtual void TearDown() {
43 | RecordProperty("TearDownProp", 2);
44 | }
45 | };
46 |
47 | TEST_F(PropertyTwo, TestSomeProperties) {
48 | RecordProperty("TestSomeProperty", 2);
49 | }
50 |
--------------------------------------------------------------------------------
/.utest/gtest-1.6.0/codegear/gtest.groupproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | {c1d923e0-6cba-4332-9b6f-3420acbf5091}
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | Default.Personality
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/include/compress/policy/VSEncodingDP.hpp:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------------------
2 | * VSEncodingDP.hpp - To scan optimal partitions in a list
3 | *
4 | * Coding-Style: google-styleguide
5 | * https://code.google.com/p/google-styleguide/
6 | *
7 | * Authors:
8 | * Takeshi Yamamuro
9 | * Fabrizio Silvestri
10 | * Rossano Venturini
11 | *
12 | * Copyright 2012 Integer Encoding Library
13 | * http://integerencoding.ist.cnr.it/
14 | *-----------------------------------------------------------------------------
15 | */
16 |
17 | #ifndef __VSENCODINGDP_HPP__
18 | #define __VSENCODINGDP_HPP__
19 |
20 | #include
21 |
22 | /*
23 | * If a list is larger that this value, then
24 | * it is split into subblocks that are
25 | * compressed separatelly. Compression is
26 | * slightly worse, but the decompression is
27 | * more cache-friendly.
28 | */
29 | const uint32_t VSENCODING_BLOCKSZ = 65536;
30 |
31 | namespace integer_encoding {
32 | namespace internals {
33 |
34 | class VSEncodingDP {
35 | public:
36 | explicit VSEncodingDP(const uint32_t *lens,
37 | const uint32_t *zlens,
38 | uint32_t size,
39 | bool aligned);
40 |
41 | ~VSEncodingDP() throw();
42 |
43 | /*
44 | * computePartition
45 | * Compute optimal sub-lists from input a list
46 | * seq : input list
47 | * parts : calculated optimal sub-lists
48 | * cost : fix cost in bits that we pay for each block
49 | */
50 | void computePartition(const std::vector& seq,
51 | std::vector *parts,
52 | uint32_t cost) const;
53 |
54 | private:
55 | bool aligned_;
56 | uint32_t size_;
57 | uint32_t mxblk_;
58 | const uint32_t *lens_;
59 | const uint32_t *zlens_;
60 |
61 | DISALLOW_COPY_AND_ASSIGN(VSEncodingDP);
62 | }; /* VSEncodingDP */
63 |
64 | } /* namespace: internals */
65 | } /* namespace: integer_encoding */
66 |
67 | #endif /* __VSENCODINGDP_HPP__ */
68 |
--------------------------------------------------------------------------------
/.utest/gtest-1.6.0/test/gtest-typed-test2_test.cc:
--------------------------------------------------------------------------------
1 | // Copyright 2008 Google Inc.
2 | // All Rights Reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // Author: wan@google.com (Zhanyong Wan)
31 |
32 | #include
33 |
34 | #include "test/gtest-typed-test_test.h"
35 | #include "gtest/gtest.h"
36 |
37 | #if GTEST_HAS_TYPED_TEST_P
38 |
39 | // Tests that the same type-parameterized test case can be
40 | // instantiated in different translation units linked together.
41 | // (ContainerTest is also instantiated in gtest-typed-test_test.cc.)
42 | INSTANTIATE_TYPED_TEST_CASE_P(Vector, ContainerTest,
43 | testing::Types >);
44 |
45 | #endif // GTEST_HAS_TYPED_TEST_P
46 |
--------------------------------------------------------------------------------
/.utest/gtest-1.6.0/samples/sample4.h:
--------------------------------------------------------------------------------
1 | // Copyright 2005, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | // A sample program demonstrating using Google C++ testing framework.
31 | //
32 | // Author: wan@google.com (Zhanyong Wan)
33 |
34 | #ifndef GTEST_SAMPLES_SAMPLE4_H_
35 | #define GTEST_SAMPLES_SAMPLE4_H_
36 |
37 | // A simple monotonic counter.
38 | class Counter {
39 | private:
40 | int counter_;
41 |
42 | public:
43 | // Creates a counter that starts at 0.
44 | Counter() : counter_(0) {}
45 |
46 | // Returns the current counter value, and increments it.
47 | int Increment();
48 |
49 | // Prints the current counter value to STDOUT.
50 | void Print() const;
51 | };
52 |
53 | #endif // GTEST_SAMPLES_SAMPLE4_H_
54 |
--------------------------------------------------------------------------------
/.utest/gtest-1.6.0/test/gtest_help_test_.cc:
--------------------------------------------------------------------------------
1 | // Copyright 2009, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // Author: wan@google.com (Zhanyong Wan)
31 |
32 | // This program is meant to be run by gtest_help_test.py. Do not run
33 | // it directly.
34 |
35 | #include "gtest/gtest.h"
36 |
37 | // When a help flag is specified, this program should skip the tests
38 | // and exit with 0; otherwise the following test will be executed,
39 | // causing this program to exit with a non-zero code.
40 | TEST(HelpFlagTest, ShouldNotBeRun) {
41 | ASSERT_TRUE(false) << "Tests shouldn't be run when --help is specified.";
42 | }
43 |
44 | #if GTEST_HAS_DEATH_TEST
45 | TEST(DeathTest, UsedByPythonScriptToDetectSupportForDeathTestsInThisBinary) {}
46 | #endif
47 |
--------------------------------------------------------------------------------
/.utest/gtest-1.6.0/src/gtest-all.cc:
--------------------------------------------------------------------------------
1 | // Copyright 2008, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // Author: mheule@google.com (Markus Heule)
31 | //
32 | // Google C++ Testing Framework (Google Test)
33 | //
34 | // Sometimes it's desirable to build Google Test by compiling a single file.
35 | // This file serves this purpose.
36 |
37 | // This line ensures that gtest.h can be compiled on its own, even
38 | // when it's fused.
39 | #include "gtest/gtest.h"
40 |
41 | // The following lines pull in the real gtest *.cc files.
42 | #include "src/gtest.cc"
43 | #include "src/gtest-death-test.cc"
44 | #include "src/gtest-filepath.cc"
45 | #include "src/gtest-port.cc"
46 | #include "src/gtest-printers.cc"
47 | #include "src/gtest-test-part.cc"
48 | #include "src/gtest-typed-test.cc"
49 |
--------------------------------------------------------------------------------
/.utest/gtest-1.6.0/test/production.h:
--------------------------------------------------------------------------------
1 | // Copyright 2006, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // Author: wan@google.com (Zhanyong Wan)
31 | //
32 | // This is part of the unit test for include/gtest/gtest_prod.h.
33 |
34 | #ifndef GTEST_TEST_PRODUCTION_H_
35 | #define GTEST_TEST_PRODUCTION_H_
36 |
37 | #include "gtest/gtest_prod.h"
38 |
39 | class PrivateCode {
40 | public:
41 | // Declares a friend test that does not use a fixture.
42 | FRIEND_TEST(PrivateCodeTest, CanAccessPrivateMembers);
43 |
44 | // Declares a friend test that uses a fixture.
45 | FRIEND_TEST(PrivateCodeFixtureTest, CanAccessPrivateMembers);
46 |
47 | PrivateCode();
48 |
49 | int x() const { return x_; }
50 | private:
51 | void set_x(int an_x) { x_ = an_x; }
52 | int x_;
53 | };
54 |
55 | #endif // GTEST_TEST_PRODUCTION_H_
56 |
--------------------------------------------------------------------------------
/.utest/gtest-1.6.0/test/gtest_all_test.cc:
--------------------------------------------------------------------------------
1 | // Copyright 2009, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // Author: wan@google.com (Zhanyong Wan)
31 | //
32 | // Tests for Google C++ Testing Framework (Google Test)
33 | //
34 | // Sometimes it's desirable to build most of Google Test's own tests
35 | // by compiling a single file. This file serves this purpose.
36 | #include "test/gtest-filepath_test.cc"
37 | #include "test/gtest-linked_ptr_test.cc"
38 | #include "test/gtest-message_test.cc"
39 | #include "test/gtest-options_test.cc"
40 | #include "test/gtest-port_test.cc"
41 | #include "test/gtest_pred_impl_unittest.cc"
42 | #include "test/gtest_prod_test.cc"
43 | #include "test/gtest-test-part_test.cc"
44 | #include "test/gtest-typed-test_test.cc"
45 | #include "test/gtest-typed-test2_test.cc"
46 | #include "test/gtest_unittest.cc"
47 | #include "test/production.cc"
48 |
--------------------------------------------------------------------------------
/.utest/gtest-1.6.0/test/gtest_prod_test.cc:
--------------------------------------------------------------------------------
1 | // Copyright 2006, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // Author: wan@google.com (Zhanyong Wan)
31 | //
32 | // Unit test for include/gtest/gtest_prod.h.
33 |
34 | #include "gtest/gtest.h"
35 | #include "test/production.h"
36 |
37 | // Tests that private members can be accessed from a TEST declared as
38 | // a friend of the class.
39 | TEST(PrivateCodeTest, CanAccessPrivateMembers) {
40 | PrivateCode a;
41 | EXPECT_EQ(0, a.x_);
42 |
43 | a.set_x(1);
44 | EXPECT_EQ(1, a.x_);
45 | }
46 |
47 | typedef testing::Test PrivateCodeFixtureTest;
48 |
49 | // Tests that private members can be accessed from a TEST_F declared
50 | // as a friend of the class.
51 | TEST_F(PrivateCodeFixtureTest, CanAccessPrivateMembers) {
52 | PrivateCode a;
53 | EXPECT_EQ(0, a.x_);
54 |
55 | a.set_x(2);
56 | EXPECT_EQ(2, a.x_);
57 | }
58 |
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | CC = g++
2 | CCVERSION := $(strip $(shell $(CC) --version))
3 | #CFLAGS += -O2 -msse2
4 | CFLAGS += -DNDEBUG -O9 -msse2 -fomit-frame-pointer --param max-inline-insns-single=1000 \
5 | --param inline-unit-growth=1000 --param max-completely-peel-times=100 -march=nocona
6 | CFLAGS += $(if $(filter 4.4.% 4.5.% 4.6.%,$(CCVERSION)), -std=gnu++0x,)
7 | CFLAGS += $(if $(filter 4.7.%,$(CCVERSION)), -std=gnu++11,)
8 | WFLAGS = -Wall -Wextra -Wformat=2 -Wcast-qual -Wcast-align -Wwrite-strings -Wfloat-equal \
9 | -Wno-strict-aliasing -Wpointer-arith -Wswitch-enum -Woverloaded-virtual -Weffc++ -Wno-unused
10 | # WFLAGS += -Wconversion
11 | WFLAGS += $(if $(filter 4.6.% 4.7.%,$(CCVERSION)), -Wno-unused-but-set-variable,)
12 | LDFLAGS = -L/usr/local/lib
13 | INCLUDE = -I./include
14 | LIBS = -lpthread
15 | SRCS = $(shell find ./src ! -regex ".*test.*" -name '*.cpp' -type f)
16 | OBJS = $(subst .cpp,.o,$(SRCS))
17 |
18 | # vcompress
19 | VSRCS = $(shell find ./tool -name '*.cpp' -type f)
20 | VOBJS = $(subst .cpp,.o,$(VSRCS))
21 | VCOMPRESS = vcompress
22 | VSCRIPT = run-perfs.sh
23 |
24 | # For general tests
25 | TSRCS = $(shell find ./src -name '*_unitest.cpp' -type f)
26 | TOBJS = $(subst .cpp,.o,$(TSRCS))
27 | TEST = encoding_utest
28 | INSPECT = .inspection.sh
29 |
30 | # For google tests
31 | GDIR = .utest/gtest-1.6.0
32 | GINCLUDE = -I$(GDIR)/include -I$(GDIR)
33 | GHEADERS = $(GDIR)/include/gtest/*.h $(GDIR)/include/gtest/internal/*.h
34 | GSRCS = $(GDIR)/src/*.cc $(GDIR)/src/*.h $(GTEST_HEADERS)
35 |
36 | .PHONY:all
37 | all: $(VCOMPRESS)
38 |
39 | $(VCOMPRESS): $(OBJS) $(VOBJS)
40 | $(CC) $(CFLAGS) $(WFLAGS) $(OBJS) $(VOBJS) $(INCLUDE) $(LDFLAGS) $(LIBS) -o $@
41 | cp tool/$(VSCRIPT) .
42 |
43 | .cpp.o:
44 | $(CC) $(CXXFLAGS) $(CFLAGS) $(WFLAGS) $(INCLUDE) $(LDFLAGS) $(LIBS) -c $< -o $@
45 |
46 | .PHONY:check
47 | check:
48 | ./$(INSPECT)
49 |
50 | .PHONY:test
51 | test: $(TEST)
52 |
53 | $(TEST): gtest-all.o $(TOBJS) $(OBJS)
54 | $(CC) $(CXXFLAGS) $(CFLAGS) $(TOBJS) $(OBJS) $(LIBS) gtest-all.o -o $@
55 |
56 | gtest-all.o: $(GSRCS)
57 | $(CC) $(GINCLUDE) -c $(GDIR)/src/gtest-all.cc
58 |
59 | $(TOBJS):
60 | $(CC) $(CXXFLAGS) $(CPPFLAGS) $(CFLAGS) $(INCLUDE) $(GINCLUDE) \
61 | $(LDFLAGS) -c $(addsuffix .cpp, $(basename $@)) -o $@
62 |
63 | .PHONY:clean
64 | clean:
65 | rm -f *.dat *.output *.log *.gcda *.gcno *.info *.o *.a \
66 | $(VCOMPRESS) $(VSCRIPT) $(TEST)
67 | $(MAKE) -C src clean
68 | $(MAKE) -C tool clean
69 |
70 |
--------------------------------------------------------------------------------
/.utest/gtest-1.6.0/test/gtest_sole_header_test.cc:
--------------------------------------------------------------------------------
1 | // Copyright 2008, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // Author: mheule@google.com (Markus Heule)
31 | //
32 | // This test verifies that it's possible to use Google Test by including
33 | // the gtest.h header file alone.
34 |
35 | #include "gtest/gtest.h"
36 |
37 | namespace {
38 |
39 | void Subroutine() {
40 | EXPECT_EQ(42, 42);
41 | }
42 |
43 | TEST(NoFatalFailureTest, ExpectNoFatalFailure) {
44 | EXPECT_NO_FATAL_FAILURE(;);
45 | EXPECT_NO_FATAL_FAILURE(SUCCEED());
46 | EXPECT_NO_FATAL_FAILURE(Subroutine());
47 | EXPECT_NO_FATAL_FAILURE({ SUCCEED(); });
48 | }
49 |
50 | TEST(NoFatalFailureTest, AssertNoFatalFailure) {
51 | ASSERT_NO_FATAL_FAILURE(;);
52 | ASSERT_NO_FATAL_FAILURE(SUCCEED());
53 | ASSERT_NO_FATAL_FAILURE(Subroutine());
54 | ASSERT_NO_FATAL_FAILURE({ SUCCEED(); });
55 | }
56 |
57 | } // namespace
58 |
--------------------------------------------------------------------------------
/.utest/gtest-1.6.0/samples/sample2.cc:
--------------------------------------------------------------------------------
1 | // Copyright 2005, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | // A sample program demonstrating using Google C++ testing framework.
31 | //
32 | // Author: wan@google.com (Zhanyong Wan)
33 |
34 | #include "sample2.h"
35 |
36 | #include
37 |
38 | // Clones a 0-terminated C string, allocating memory using new.
39 | const char* MyString::CloneCString(const char* a_c_string) {
40 | if (a_c_string == NULL) return NULL;
41 |
42 | const size_t len = strlen(a_c_string);
43 | char* const clone = new char[ len + 1 ];
44 | memcpy(clone, a_c_string, len + 1);
45 |
46 | return clone;
47 | }
48 |
49 | // Sets the 0-terminated C string this MyString object
50 | // represents.
51 | void MyString::Set(const char* a_c_string) {
52 | // Makes sure this works when c_string == c_string_
53 | const char* const temp = MyString::CloneCString(a_c_string);
54 | delete[] c_string_;
55 | c_string_ = temp;
56 | }
57 |
--------------------------------------------------------------------------------
/.utest/gtest-1.6.0/xcode/Samples/FrameworkSample/widget.h:
--------------------------------------------------------------------------------
1 | // Copyright 2008, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // Author: preston.a.jackson@gmail.com (Preston Jackson)
31 | //
32 | // Google Test - FrameworkSample
33 | // widget.h
34 | //
35 |
36 | // Widget is a very simple class used for demonstrating the use of gtest. It
37 | // simply stores two values a string and an integer, which are returned via
38 | // public accessors in multiple forms.
39 |
40 | #import
41 |
42 | class Widget {
43 | public:
44 | Widget(int number, const std::string& name);
45 | ~Widget();
46 |
47 | // Public accessors to number data
48 | float GetFloatValue() const;
49 | int GetIntValue() const;
50 |
51 | // Public accessors to the string data
52 | std::string GetStringValue() const;
53 | void GetCharPtrValue(char* buffer, size_t max_size) const;
54 |
55 | private:
56 | // Data members
57 | float number_;
58 | std::string name_;
59 | };
60 |
--------------------------------------------------------------------------------
/.utest/gtest-1.6.0/include/gtest/gtest_prod.h:
--------------------------------------------------------------------------------
1 | // Copyright 2006, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // Author: wan@google.com (Zhanyong Wan)
31 | //
32 | // Google C++ Testing Framework definitions useful in production code.
33 |
34 | #ifndef GTEST_INCLUDE_GTEST_GTEST_PROD_H_
35 | #define GTEST_INCLUDE_GTEST_GTEST_PROD_H_
36 |
37 | // When you need to test the private or protected members of a class,
38 | // use the FRIEND_TEST macro to declare your tests as friends of the
39 | // class. For example:
40 | //
41 | // class MyClass {
42 | // private:
43 | // void MyMethod();
44 | // FRIEND_TEST(MyClassTest, MyMethod);
45 | // };
46 | //
47 | // class MyClassTest : public testing::Test {
48 | // // ...
49 | // };
50 | //
51 | // TEST_F(MyClassTest, MyMethod) {
52 | // // Can call MyClass::MyMethod() here.
53 | // }
54 |
55 | #define FRIEND_TEST(test_case_name, test_name)\
56 | friend class test_case_name##_##test_name##_Test
57 |
58 | #endif // GTEST_INCLUDE_GTEST_GTEST_PROD_H_
59 |
--------------------------------------------------------------------------------
/.utest/gtest-1.6.0/test/gtest-param-test_test.h:
--------------------------------------------------------------------------------
1 | // Copyright 2008, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // Authors: vladl@google.com (Vlad Losev)
31 | //
32 | // The Google C++ Testing Framework (Google Test)
33 | //
34 | // This header file provides classes and functions used internally
35 | // for testing Google Test itself.
36 |
37 | #ifndef GTEST_TEST_GTEST_PARAM_TEST_TEST_H_
38 | #define GTEST_TEST_GTEST_PARAM_TEST_TEST_H_
39 |
40 | #include "gtest/gtest.h"
41 |
42 | #if GTEST_HAS_PARAM_TEST
43 |
44 | // Test fixture for testing definition and instantiation of a test
45 | // in separate translation units.
46 | class ExternalInstantiationTest : public ::testing::TestWithParam {};
47 |
48 | // Test fixture for testing instantiation of a test in multiple
49 | // translation units.
50 | class InstantiationInMultipleTranslaionUnitsTest
51 | : public ::testing::TestWithParam {};
52 |
53 | #endif // GTEST_HAS_PARAM_TEST
54 |
55 | #endif // GTEST_TEST_GTEST_PARAM_TEST_TEST_H_
56 |
--------------------------------------------------------------------------------
/.utest/gtest-1.6.0/xcode/Samples/FrameworkSample/widget.cc:
--------------------------------------------------------------------------------
1 | // Copyright 2008, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // Author: preston.a.jackson@gmail.com (Preston Jackson)
31 | //
32 | // Google Test - FrameworkSample
33 | // widget.cc
34 | //
35 |
36 | // Widget is a very simple class used for demonstrating the use of gtest
37 |
38 | #include "widget.h"
39 |
40 | Widget::Widget(int number, const std::string& name)
41 | : number_(number),
42 | name_(name) {}
43 |
44 | Widget::~Widget() {}
45 |
46 | float Widget::GetFloatValue() const {
47 | return number_;
48 | }
49 |
50 | int Widget::GetIntValue() const {
51 | return static_cast(number_);
52 | }
53 |
54 | std::string Widget::GetStringValue() const {
55 | return name_;
56 | }
57 |
58 | void Widget::GetCharPtrValue(char* buffer, size_t max_size) const {
59 | // Copy the char* representation of name_ into buffer, up to max_size.
60 | strncpy(buffer, name_.c_str(), max_size-1);
61 | buffer[max_size-1] = '\0';
62 | return;
63 | }
64 |
--------------------------------------------------------------------------------
/.utest/gtest-1.6.0/msvc/gtest.sln:
--------------------------------------------------------------------------------
1 | Microsoft Visual Studio Solution File, Format Version 8.00
2 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtest", "gtest.vcproj", "{C8F6C172-56F2-4E76-B5FA-C3B423B31BE7}"
3 | ProjectSection(ProjectDependencies) = postProject
4 | EndProjectSection
5 | EndProject
6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtest_main", "gtest_main.vcproj", "{3AF54C8A-10BF-4332-9147-F68ED9862032}"
7 | ProjectSection(ProjectDependencies) = postProject
8 | EndProjectSection
9 | EndProject
10 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtest_unittest", "gtest_unittest.vcproj", "{4D9FDFB5-986A-4139-823C-F4EE0ED481A1}"
11 | ProjectSection(ProjectDependencies) = postProject
12 | EndProjectSection
13 | EndProject
14 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtest_prod_test", "gtest_prod_test.vcproj", "{24848551-EF4F-47E8-9A9D-EA4D49BC3ECA}"
15 | ProjectSection(ProjectDependencies) = postProject
16 | EndProjectSection
17 | EndProject
18 | Global
19 | GlobalSection(SolutionConfiguration) = preSolution
20 | Debug = Debug
21 | Release = Release
22 | EndGlobalSection
23 | GlobalSection(ProjectConfiguration) = postSolution
24 | {C8F6C172-56F2-4E76-B5FA-C3B423B31BE7}.Debug.ActiveCfg = Debug|Win32
25 | {C8F6C172-56F2-4E76-B5FA-C3B423B31BE7}.Debug.Build.0 = Debug|Win32
26 | {C8F6C172-56F2-4E76-B5FA-C3B423B31BE7}.Release.ActiveCfg = Release|Win32
27 | {C8F6C172-56F2-4E76-B5FA-C3B423B31BE7}.Release.Build.0 = Release|Win32
28 | {3AF54C8A-10BF-4332-9147-F68ED9862032}.Debug.ActiveCfg = Debug|Win32
29 | {3AF54C8A-10BF-4332-9147-F68ED9862032}.Debug.Build.0 = Debug|Win32
30 | {3AF54C8A-10BF-4332-9147-F68ED9862032}.Release.ActiveCfg = Release|Win32
31 | {3AF54C8A-10BF-4332-9147-F68ED9862032}.Release.Build.0 = Release|Win32
32 | {4D9FDFB5-986A-4139-823C-F4EE0ED481A1}.Debug.ActiveCfg = Debug|Win32
33 | {4D9FDFB5-986A-4139-823C-F4EE0ED481A1}.Debug.Build.0 = Debug|Win32
34 | {4D9FDFB5-986A-4139-823C-F4EE0ED481A1}.Release.ActiveCfg = Release|Win32
35 | {4D9FDFB5-986A-4139-823C-F4EE0ED481A1}.Release.Build.0 = Release|Win32
36 | {24848551-EF4F-47E8-9A9D-EA4D49BC3ECA}.Debug.ActiveCfg = Debug|Win32
37 | {24848551-EF4F-47E8-9A9D-EA4D49BC3ECA}.Debug.Build.0 = Debug|Win32
38 | {24848551-EF4F-47E8-9A9D-EA4D49BC3ECA}.Release.ActiveCfg = Release|Win32
39 | {24848551-EF4F-47E8-9A9D-EA4D49BC3ECA}.Release.Build.0 = Release|Win32
40 | EndGlobalSection
41 | GlobalSection(ExtensibilityGlobals) = postSolution
42 | EndGlobalSection
43 | GlobalSection(ExtensibilityAddIns) = postSolution
44 | EndGlobalSection
45 | EndGlobal
46 |
--------------------------------------------------------------------------------
/.utest/gtest-1.6.0/msvc/gtest-md.sln:
--------------------------------------------------------------------------------
1 | Microsoft Visual Studio Solution File, Format Version 8.00
2 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtest-md", "gtest-md.vcproj", "{C8F6C172-56F2-4E76-B5FA-C3B423B31BE8}"
3 | ProjectSection(ProjectDependencies) = postProject
4 | EndProjectSection
5 | EndProject
6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtest_main-md", "gtest_main-md.vcproj", "{3AF54C8A-10BF-4332-9147-F68ED9862033}"
7 | ProjectSection(ProjectDependencies) = postProject
8 | EndProjectSection
9 | EndProject
10 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtest_prod_test-md", "gtest_prod_test-md.vcproj", "{24848551-EF4F-47E8-9A9D-EA4D49BC3ECB}"
11 | ProjectSection(ProjectDependencies) = postProject
12 | EndProjectSection
13 | EndProject
14 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtest_unittest-md", "gtest_unittest-md.vcproj", "{4D9FDFB5-986A-4139-823C-F4EE0ED481A2}"
15 | ProjectSection(ProjectDependencies) = postProject
16 | EndProjectSection
17 | EndProject
18 | Global
19 | GlobalSection(SolutionConfiguration) = preSolution
20 | Debug = Debug
21 | Release = Release
22 | EndGlobalSection
23 | GlobalSection(ProjectConfiguration) = postSolution
24 | {C8F6C172-56F2-4E76-B5FA-C3B423B31BE8}.Debug.ActiveCfg = Debug|Win32
25 | {C8F6C172-56F2-4E76-B5FA-C3B423B31BE8}.Debug.Build.0 = Debug|Win32
26 | {C8F6C172-56F2-4E76-B5FA-C3B423B31BE8}.Release.ActiveCfg = Release|Win32
27 | {C8F6C172-56F2-4E76-B5FA-C3B423B31BE8}.Release.Build.0 = Release|Win32
28 | {3AF54C8A-10BF-4332-9147-F68ED9862033}.Debug.ActiveCfg = Debug|Win32
29 | {3AF54C8A-10BF-4332-9147-F68ED9862033}.Debug.Build.0 = Debug|Win32
30 | {3AF54C8A-10BF-4332-9147-F68ED9862033}.Release.ActiveCfg = Release|Win32
31 | {3AF54C8A-10BF-4332-9147-F68ED9862033}.Release.Build.0 = Release|Win32
32 | {24848551-EF4F-47E8-9A9D-EA4D49BC3ECB}.Debug.ActiveCfg = Debug|Win32
33 | {24848551-EF4F-47E8-9A9D-EA4D49BC3ECB}.Debug.Build.0 = Debug|Win32
34 | {24848551-EF4F-47E8-9A9D-EA4D49BC3ECB}.Release.ActiveCfg = Release|Win32
35 | {24848551-EF4F-47E8-9A9D-EA4D49BC3ECB}.Release.Build.0 = Release|Win32
36 | {4D9FDFB5-986A-4139-823C-F4EE0ED481A2}.Debug.ActiveCfg = Debug|Win32
37 | {4D9FDFB5-986A-4139-823C-F4EE0ED481A2}.Debug.Build.0 = Debug|Win32
38 | {4D9FDFB5-986A-4139-823C-F4EE0ED481A2}.Release.ActiveCfg = Release|Win32
39 | {4D9FDFB5-986A-4139-823C-F4EE0ED481A2}.Release.Build.0 = Release|Win32
40 | EndGlobalSection
41 | GlobalSection(ExtensibilityGlobals) = postSolution
42 | EndGlobalSection
43 | GlobalSection(ExtensibilityAddIns) = postSolution
44 | EndGlobalSection
45 | EndGlobal
46 |
--------------------------------------------------------------------------------
/.utest/gtest-1.6.0/xcode/Samples/FrameworkSample/runtests.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #
3 | # Copyright 2008, Google Inc.
4 | # All rights reserved.
5 | #
6 | # Redistribution and use in source and binary forms, with or without
7 | # modification, are permitted provided that the following conditions are
8 | # met:
9 | #
10 | # * Redistributions of source code must retain the above copyright
11 | # notice, this list of conditions and the following disclaimer.
12 | # * Redistributions in binary form must reproduce the above
13 | # copyright notice, this list of conditions and the following disclaimer
14 | # in the documentation and/or other materials provided with the
15 | # distribution.
16 | # * Neither the name of Google Inc. nor the names of its
17 | # contributors may be used to endorse or promote products derived from
18 | # this software without specific prior written permission.
19 | #
20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 |
32 | # Executes the samples and tests for the Google Test Framework.
33 |
34 | # Help the dynamic linker find the path to the libraries.
35 | export DYLD_FRAMEWORK_PATH=$BUILT_PRODUCTS_DIR
36 | export DYLD_LIBRARY_PATH=$BUILT_PRODUCTS_DIR
37 |
38 | # Create some executables.
39 | test_executables=$@
40 |
41 | # Now execute each one in turn keeping track of how many succeeded and failed.
42 | succeeded=0
43 | failed=0
44 | failed_list=()
45 | for test in ${test_executables[*]}; do
46 | "$test"
47 | result=$?
48 | if [ $result -eq 0 ]; then
49 | succeeded=$(( $succeeded + 1 ))
50 | else
51 | failed=$(( failed + 1 ))
52 | failed_list="$failed_list $test"
53 | fi
54 | done
55 |
56 | # Report the successes and failures to the console.
57 | echo "Tests complete with $succeeded successes and $failed failures."
58 | if [ $failed -ne 0 ]; then
59 | echo "The following tests failed:"
60 | echo $failed_list
61 | fi
62 | exit $failed
63 |
--------------------------------------------------------------------------------
/.utest/gtest-1.6.0/test/gtest_no_test_unittest.cc:
--------------------------------------------------------------------------------
1 | // Copyright 2006, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | // Tests that a Google Test program that has no test defined can run
31 | // successfully.
32 | //
33 | // Author: wan@google.com (Zhanyong Wan)
34 |
35 | #include "gtest/gtest.h"
36 |
37 |
38 | int main(int argc, char **argv) {
39 | testing::InitGoogleTest(&argc, argv);
40 |
41 | // An ad-hoc assertion outside of all tests.
42 | //
43 | // This serves three purposes:
44 | //
45 | // 1. It verifies that an ad-hoc assertion can be executed even if
46 | // no test is defined.
47 | // 2. It verifies that a failed ad-hoc assertion causes the test
48 | // program to fail.
49 | // 3. We had a bug where the XML output won't be generated if an
50 | // assertion is executed before RUN_ALL_TESTS() is called, even
51 | // though --gtest_output=xml is specified. This makes sure the
52 | // bug is fixed and doesn't regress.
53 | EXPECT_EQ(1, 2);
54 |
55 | // The above EXPECT_EQ() should cause RUN_ALL_TESTS() to return non-zero.
56 | return RUN_ALL_TESTS() ? 0 : 1;
57 | }
58 |
--------------------------------------------------------------------------------
/include/compress/policy/BinaryInterpolative.hpp:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------------------
2 | * BinaryInterpolative.hpp - A encoder/decoder for Binary Interpolative
3 | *
4 | * Coding-Style: google-styleguide
5 | * https://code.google.com/p/google-styleguide/
6 | *
7 | * Authors:
8 | * Takeshi Yamamuro
9 | * Fabrizio Silvestri
10 | * Rossano Venturini
11 | *
12 | * Copyright 2012 Integer Encoding Library
13 | * http://integerencoding.ist.cnr.it/
14 | *-----------------------------------------------------------------------------
15 | */
16 |
17 | #ifndef __BINARYINTERPOLATIVE_HPP__
18 | #define __BINARYINTERPOLATIVE_HPP__
19 |
20 | #include
21 |
22 | #include
23 | #include
24 | #include
25 |
26 | namespace integer_encoding {
27 | namespace internals {
28 |
29 | class BinaryInterpolative : public EncodingBase {
30 | public:
31 | BinaryInterpolative() : EncodingBase(E_BINARYIPL) {}
32 | ~BinaryInterpolative() throw() {}
33 |
34 | void encodeArray(const uint32_t *in,
35 | uint64_t len,
36 | uint32_t *out,
37 | uint64_t *nvalue) const {
38 | if (len > UINT32_MAX || *nvalue > UINT32_MAX)
39 | THROW_ENCODING_EXCEPTION(
40 | "BinaryInterpolative only supports 32-bit length");
41 |
42 | /* Write a maximum value in the head of out */
43 | out[0] = in[len - 1];
44 |
45 | /* Do actual binary interpolative code */
46 | BitsWriter wt(out + 1, len - 1);
47 | wt.intrpolatvArray(in, len, 0, 0, in[len - 1]);
48 | wt.flush_bits();
49 | *nvalue = wt.size() + 1;
50 | }
51 |
52 | uint64_t require(uint64_t len) const {
53 | if (len > UINT32_MAX)
54 | THROW_ENCODING_EXCEPTION(
55 | "BinaryInterpolative only supports 32-bit length");
56 | /* FIXME: Fill correct the required size */
57 | return len;
58 | }
59 |
60 | void decodeArray(const uint32_t *in,
61 | uint64_t len,
62 | uint32_t *out,
63 | uint64_t nvalue) const {
64 | if (len > UINT32_MAX || nvalue > UINT32_MAX)
65 | THROW_ENCODING_EXCEPTION(
66 | "BinaryInterpolative only supports 32-bit length");
67 | BitsReader rd(in + 1, len - 1);
68 | rd.intrpolatvArray(out, nvalue, 0, 0, *in);
69 | }
70 | }; /* BinaryInterpolative */
71 |
72 | } /* namespace: internals */
73 | } /* namespace: integer_encoding */
74 |
75 | #endif /* __BINARY_INTERPOLATIVE_HPP__ */
76 |
--------------------------------------------------------------------------------
/include/compress/EncodingBase.hpp:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------------------
2 | * EncodingBase.hpp - A base class for a series of decoders/encoders
3 | *
4 | * Coding-Style: google-styleguide
5 | * https://code.google.com/p/google-styleguide/
6 | *
7 | * Authors:
8 | * Takeshi Yamamuro
9 | * Fabrizio Silvestri
10 | * Rossano Venturini
11 | *
12 | * Copyright 2012 Integer Encoding Library
13 | * http://integerencoding.ist.cnr.it/
14 | *-----------------------------------------------------------------------------
15 | */
16 |
17 | #ifndef __ENCODINGBASE_HPP__
18 | #define __ENCODINGBASE_HPP__
19 |
20 | #include
21 | #include
22 |
23 | namespace integer_encoding {
24 | namespace internals {
25 |
26 | class EncodingBase {
27 | public:
28 | explicit EncodingBase(int id) : policy_(id) {}
29 | virtual ~EncodingBase() throw() {}
30 |
31 | /*
32 | * encodeArray
33 | * in : integer arrays for compression
34 | * len : 64-bit length for [in]
35 | * out : given memory space to write compressed integers, and
36 | * the size is decided by require(len)
37 | * nvalue : equals to require(len), and write back the actual
38 | * written number of 32-bit values in [out]
39 | */
40 | virtual void encodeArray(const uint32_t *in,
41 | uint64_t len,
42 | uint32_t *out,
43 | uint64_t *nvalue) const = 0;
44 |
45 | /*
46 | * require
47 | * len : length for [in] arrays in encodeArray
48 | * retrun : the worst required size
49 | */
50 | virtual uint64_t require(uint64_t len) const = 0;
51 |
52 | /*
53 | * decodeArray
54 | * in : compressed 32-bit values generated by encodeArray
55 | * len : 64-bit length for [in]
56 | * out : given memory space to decode integers, and the size
57 | * is decided by DECODE_REQUIRE_MEM(x), where x is the
58 | * original length of the compressed arrays
59 | * nvalue : equals to DECODE_REQUIRE_MEM(x)
60 | */
61 | virtual void decodeArray(const uint32_t *in,
62 | uint64_t len,
63 | uint32_t *out,
64 | uint64_t nvalue) const = 0;
65 |
66 | private:
67 | int policy_;
68 | };
69 |
70 | } /* namespace: internals */
71 |
72 | typedef std::shared_ptr EncodingPtr;
73 |
74 | } /* namespace: integer_encoding */
75 |
76 | #endif /* __ENCODINGBASE_HPP__ */
77 |
--------------------------------------------------------------------------------
/include/compress/policy/VSEncodingSimple.hpp:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------------------
2 | * VSEncodingSimple.hpp - A speed-oriented implementation of VSEncoding
3 | *
4 | * Coding-Style: google-styleguide
5 | * https://code.google.com/p/google-styleguide/
6 | *
7 | * Authors:
8 | * Takeshi Yamamuro
9 | * Fabrizio Silvestri
10 | * Rossano Venturini
11 | *
12 | * Copyright 2012 Integer Encoding Library
13 | * http://integerencoding.ist.cnr.it/
14 | *-----------------------------------------------------------------------------
15 | */
16 |
17 | #ifndef __VSENCODINGSIMPLE_HPP__
18 | #define __VSENCODINGSIMPLE_HPP__
19 |
20 | #include
21 |
22 | #include
23 | #include
24 | #include
25 |
26 | namespace integer_encoding {
27 | namespace internals {
28 |
29 | /*
30 | * NOTE: This has two following improved things
31 | * as compared th other alternative:
32 | *
33 | * 1. each partition determined by the dynamic
34 | * programming is layouted with 32-bit alignments
35 | * for performance reasons. It has the advantage of
36 | * less coping stuffs caused by VSEncodingBlocks,
37 | * but increases wasteful padding areas exploited
38 | * by VSEncodingRest.
39 | *
40 | * 2. a direct threading technique known in VM
41 | * domins is employed to dispacth unpacking
42 | * functions correspoinding to compressed
43 | * partitions, and it cound reduce the penalty
44 | * of indirect jumps.
45 | */
46 | class VSEncodingSimple : public EncodingBase {
47 | public:
48 | VSEncodingSimple();
49 | ~VSEncodingSimple() throw();
50 |
51 | void encodeArray(const uint32_t *in,
52 | uint64_t len,
53 | uint32_t *out,
54 | uint64_t *nvalue) const;
55 |
56 | void decodeArray(const uint32_t *in,
57 | uint64_t len,
58 | uint32_t *out,
59 | uint64_t nvalue) const;
60 |
61 | uint64_t require(uint64_t len) const;
62 |
63 | private:
64 | /*
65 | * FIXME: It is wasteful to allocate memory
66 | * in advance, so decodeArray needs to be
67 | * modified in a similar way of VSEncodingBlocks,
68 | * that is, it splits the constant chunk and
69 | * compress each chunk.
70 | */
71 | std::shared_ptr jtable_;
72 | std::shared_ptr vdp_;
73 | }; /* VSEncodingSimple */
74 |
75 | } /* namespace: internals */
76 | } /* namespace: integer_encoding */
77 |
78 | #endif /* __VSENCODINGSIMPLE_HPP__ */
79 |
--------------------------------------------------------------------------------
/.utest/gtest-1.6.0/test/gtest-typed-test_test.h:
--------------------------------------------------------------------------------
1 | // Copyright 2008 Google Inc.
2 | // All Rights Reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // Author: wan@google.com (Zhanyong Wan)
31 |
32 | #ifndef GTEST_TEST_GTEST_TYPED_TEST_TEST_H_
33 | #define GTEST_TEST_GTEST_TYPED_TEST_TEST_H_
34 |
35 | #include "gtest/gtest.h"
36 |
37 | #if GTEST_HAS_TYPED_TEST_P
38 |
39 | using testing::Test;
40 |
41 | // For testing that the same type-parameterized test case can be
42 | // instantiated in different translation units linked together.
43 | // ContainerTest will be instantiated in both gtest-typed-test_test.cc
44 | // and gtest-typed-test2_test.cc.
45 |
46 | template
47 | class ContainerTest : public Test {
48 | };
49 |
50 | TYPED_TEST_CASE_P(ContainerTest);
51 |
52 | TYPED_TEST_P(ContainerTest, CanBeDefaultConstructed) {
53 | TypeParam container;
54 | }
55 |
56 | TYPED_TEST_P(ContainerTest, InitialSizeIsZero) {
57 | TypeParam container;
58 | EXPECT_EQ(0U, container.size());
59 | }
60 |
61 | REGISTER_TYPED_TEST_CASE_P(ContainerTest,
62 | CanBeDefaultConstructed, InitialSizeIsZero);
63 |
64 | #endif // GTEST_HAS_TYPED_TEST_P
65 |
66 | #endif // GTEST_TEST_GTEST_TYPED_TEST_TEST_H_
67 |
--------------------------------------------------------------------------------
/include/compress/policy/PForDelta.hpp:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------------------
2 | * PForDelta.hpp - A encoder/decoder for PForDelta
3 | *
4 | * Coding-Style: google-styleguide
5 | * https://code.google.com/p/google-styleguide/
6 | *
7 | * Authors:
8 | * Takeshi Yamamuro
9 | * Fabrizio Silvestri
10 | * Rossano Venturini
11 | *
12 | * Copyright 2012 Integer Encoding Library
13 | * http://integerencoding.ist.cnr.it/
14 | *-----------------------------------------------------------------------------
15 | */
16 |
17 | #ifndef __PFORDELTA_HPP__
18 | #define __PFORDELTA_HPP__
19 |
20 | #include
21 |
22 | #include
23 | #include