Commit Graph

846 Commits

Author SHA1 Message Date
Yann Collet
5bd4237beb minor refactor 2016-12-02 12:40:57 -08:00
Przemyslaw Skibinski
690753ea1a improved formatting in FIO_decompressSrcFile 2016-12-02 16:20:16 +01:00
Przemyslaw Skibinski
4e49580407 removed testing artifacts 2016-12-02 15:19:00 +01:00
Przemyslaw Skibinski
c5eebca128 rewritten FIO_decompressGzFile 2016-12-02 15:01:31 +01:00
Przemyslaw Skibinski
b0f2ef2119 improved gzip_* functions 2016-12-02 13:50:29 +01:00
Przemyslaw Skibinski
4b504f131a added gzip_open, gzip_close, gzip_read 2016-12-02 13:11:39 +01:00
Przemyslaw Skibinski
daaf754539 detect stream with ungetc 2016-12-01 13:29:19 +01:00
Przemyslaw Skibinski
19aad42ee1 added FIO_decompressGzFile 2016-12-01 11:56:31 +01:00
Przemyslaw Skibinski
166830ed0a autodetect -lz 2016-11-30 16:43:07 +01:00
Przemyslaw Skibinski
abfb51f5f2 gzstd: decompresses .gz files 2016-11-30 15:05:54 +01:00
Przemyslaw Skibinski
0e14675df2 fileio.c: detect .gz files 2016-11-30 13:34:21 +01:00
Yann Collet
167c494748 Merge branch 'dev' of github.com:facebook/zstd into dev 2016-11-29 14:05:15 -08:00
Yann Collet
4f5350f610 long matches support overflow 2016-11-29 13:12:24 -08:00
Przemyslaw Skibinski
fd0ac93024 bench.c: use ZSTD_maxCLevel() 2016-11-23 21:45:29 +01:00
Przemyslaw Skibinski
5ddcd9d9ae bench.c: fixed MAX_CLEVEL 2016-11-21 16:37:56 +01:00
Przemyslaw Skibinski
5a17223691 Merge remote-tracking branch 'refs/remotes/facebook/dev' into dev11 2016-11-18 11:47:01 +01:00
Przemyslaw Skibinski
2558b4cdbc bench.c without dict uses ZSTD_compressCCtx 2016-11-18 11:46:30 +01:00
Przemyslaw Skibinski
3d18088b38 updated windres 2016-11-17 18:04:41 +01:00
Yann Collet
52afb3993e zbuff API now generates deprecation warnings 2016-11-16 08:50:54 -08:00
Yann Collet
cdff19c4b3 minor comment change 2016-11-11 17:26:54 -08:00
Yann Collet
0018ca28dc zstd cli : displays total decoded size, even when a stream consists of multiple frames 2016-11-07 14:42:37 -08:00
Przemyslaw Skibinski
d0815583d9 Changed stdinmark and stdoutmark 2016-11-04 11:37:27 +01:00
Przemyslaw Skibinski
38b590ad69 Merge remote-tracking branch 'refs/remotes/facebook/dev' into dev11
# Conflicts:
#	lib/Makefile
2016-11-04 10:10:54 +01:00
Yann Collet
407a11f63e fixed Visual compatibility 2016-11-03 15:52:01 -07:00
Przemyslaw Skibinski
3a415594b1 fixed MinGW compilation 2016-11-03 12:59:20 +01:00
Przemyslaw Skibinski
1f60eb6b17 Merge remote-tracking branch 'refs/remotes/facebook/dev' into dev11 2016-11-03 11:38:04 +01:00
Przemyslaw Skibinski
26306fcacf BMK_SetNbIterations renamed to BMK_SetNbSeconds 2016-11-03 11:38:01 +01:00
Przemyslaw Skibinski
b40884f43d preserve file modification time for Visual C++ 2016-11-03 09:54:53 +01:00
Yann Collet
7347869fb6 fixed make install 2016-11-02 22:28:37 -07:00
Yann Collet
179b19776f fileio.c does no longer need ZSTD_LEGACY_SUPPORT, and does no longer depend on zstd_legacy.h
Added : ZSTD_isFrame() in experimental section
2016-11-02 17:30:49 -07:00
Yann Collet
f3f13211ae Fix #419 : no warning when setting custom LDFLAGS 2016-11-02 17:02:45 -07:00
Przemyslaw Skibinski
fcf22e3473 set permissions, access and modification times 2016-11-02 14:08:07 +01:00
Przemyslaw Skibinski
a42794df61 preserve file modification time 2016-11-02 13:08:39 +01:00
Przemyslaw Skibinski
d872b64f52 added UTIL_setModificationTime, UTIL_getModificationTime 2016-11-02 12:52:20 +01:00
Yann Collet
3d197d4c8c updated man page 2016-10-31 18:10:32 -07:00
Yann Collet
b9550d6d43 fixed benchmark mode typo .
added benchmark mode tests
2016-10-28 14:43:24 -07:00
Yann Collet
22de81e87e updated man page 2016-10-28 13:58:31 -07:00
Przemyslaw Skibinski
bd0bd0fb65 generate RES files during each compilation 2016-10-28 18:15:34 +02:00
Przemyslaw Skibinski
589a8f27b7 generate_res.bat moved to programs/windres 2016-10-28 13:17:35 +02:00
Przemyslaw Skibinski
76d66dffd0 generate_res moved to programs/windres 2016-10-28 13:16:06 +02:00
Przemyslaw Skibinski
347903cfb5 Windows resources moved to programs/windres/ 2016-10-25 10:34:41 +02:00
Yann Collet
a7a4690b0a use implicit rules to compile zstd_decompress.c 2016-10-18 16:01:03 -07:00
Yann Collet
33fdd099bb fix command line interpretation 2016-10-17 17:48:48 -07:00
Yann Collet
70077bc9bb refactor for long commands 2016-10-14 14:41:17 -07:00
Yann Collet
d7b120ab5c added long commands --memory= and --memlimit-decompress= 2016-10-14 14:22:32 -07:00
Yann Collet
1122349ac2 added long comment --memlimit= 2016-10-14 14:07:11 -07:00
Yann Collet
d4cda27b63 new command -M#, to limit memory usage during decompression (#403) 2016-10-14 13:32:20 -07:00
Yann Collet
e19111c42f make creates libzstd binaries (#415) 2016-10-12 11:09:36 -07:00
Nick Terrell
3e82f2b61a Remove references to GPLv2 license
License headers added to Makefiles were taken from `zstd/Makefile`.
2016-10-11 15:28:40 -07:00
inikep
23cec875cd fixed Makefile targets: zstd-small, zstd-decompress, zstd-compress 2016-10-05 11:56:22 +02:00
Nick Terrell
2b4de225e1 Don't redefine macro in util.h 2016-09-22 18:02:39 -07:00
Nick Terrell
5b2c0dbed0 Add include guards to datagen.h 2016-09-22 17:12:50 -07:00
Yann Collet
993060e0f2 cli : better adaptation to small files 2016-09-21 16:46:08 +02:00
Yann Collet
714464f05d fixed : cli : forgotten mandatory argument 2016-09-21 16:05:03 +02:00
Yann Collet
27b5ac666e Implemented "command must be followed by argument" protection
suggested by @terrelln (#375)
2016-09-21 14:31:22 +02:00
Yann Collet
0977f7ece6 minor refactor for clarity 2016-09-21 12:24:43 +02:00
Yann Collet
dbe70bad48 completed change from projects to build 2016-09-19 15:08:43 +02:00
Yann Collet
60038948e6 added -- command in help 2016-09-16 18:52:52 +02:00
inikep
3e70cf8036 Merge remote-tracking branch 'refs/remotes/facebook/dev' into dev 2016-09-15 20:41:40 +02:00
inikep
6173931868 fixed memory leak reported by bryongloden 2016-09-15 18:58:18 +02:00
Yann Collet
a6bdf55759 fixed memory leak 2016-09-15 17:02:06 +02:00
Yann Collet
43eeea4725 fileio uses ZSTD_resetCStream() 2016-09-15 15:38:44 +02:00
Yann Collet
0b01a8ef09 Merge pull request #366 from inikep/dev
zstd.exe has FileVersion and ProductVersion with 32-bit gcc (MinGW)
2016-09-14 19:42:29 +02:00
Yann Collet
3ecbe6a37c fileio uses ZSTD_resetDStream() 2016-09-14 17:26:59 +02:00
inikep
c03f15e89d zstd.exe has FileVersion and ProductVersion with 32-bit gcc (MinGW) 2016-09-14 16:16:24 +02:00
Yann Collet
64a84edef5 added -r support for Mac OS-X 2016-09-13 17:54:37 +02:00
Yann Collet
c4cc9bf973 -r generates an error on systems which do not support it 2016-09-13 17:50:08 +02:00
inikep
9f25fcf804 fixed precision warnigns 2016-09-13 16:38:54 +02:00
inikep
362708d4d2 zstd.exe has FileVersion and ProductVersion 2016-09-13 13:53:43 +02:00
inikep
1c5ba8a5e7 util.h: removed dependency from PATH_MAX 2016-09-13 13:13:10 +02:00
Yann Collet
a3481d6de0 make uninstall 2016-09-12 05:04:26 +02:00
Yann Collet
d77f2ceee6 Merge branch 'dev' of github.com:Cyan4973/zstd into dev 2016-09-12 03:14:03 +02:00
Yann Collet
5c6d244973 Merge branch 'dev' of github.com:facebook/zstd into dev 2016-09-07 14:54:54 +02:00
Yann Collet
ac8bace6b1 support large skippable frames 2016-09-07 14:54:23 +02:00
Yann Collet
03d3f238de minor comment 2016-09-07 07:01:33 +02:00
Yann Collet
aad9fe5470 don't remove() /dev/null (#316) 2016-09-07 07:00:08 +02:00
Yann Collet
7ae67bb18a small compression speed gains with using_CDict 2016-09-06 06:28:05 +02:00
Thomas Klausner
b85cdabd50 Enable install targets for NetBSD. 2016-09-04 14:37:57 +02:00
Yann Collet
33a0465a51 fixed a few links 2016-09-02 22:11:49 -07:00
Yann Collet
5b8c024716 fixed zstd-pgo (#329) reported by @octoploid 2016-09-02 09:44:00 -07:00
Yann Collet
60181e3aaf zstd cli correctly detects console on Mac OS-X 2016-09-01 17:14:02 -07:00
Yann Collet
c843142ad0 zstd -d writes to stdout when input is stdin 2016-09-01 15:05:57 -07:00
Yann Collet
1c59c20903 removed redundant files 2016-08-31 07:15:44 -07:00
Yann Collet
599c69d917 minor Makefile updates 2016-08-30 13:33:20 -07:00
Yann Collet
4ded9e591c added boilerplate 2016-08-30 11:06:28 -07:00
Yann Collet
09c3c8e885 Merge pull request #307 from inikep/dev08
updated README.md
2016-08-29 16:32:33 -07:00
inikep
6416b0d705 updated README.md 2016-08-29 13:04:26 +02:00
Yann Collet
54caf6893e Removed fileio_legacy; now legacy supports relies entirely on streaming API.
CLI legacy support now limited to v0.4+
2016-08-28 19:20:13 -07:00
Yann Collet
9097f7b156 fixed versionsTest 2016-08-28 16:25:56 -07:00
Yann Collet
1c69baa1a9 CLI supports Legacy formats v0.4+ 2016-08-28 12:47:17 -07:00
Yann Collet
5f53b0335e fixed continuation context 2016-08-28 10:00:49 -07:00
Yann Collet
ab267e772c removed fileio specific legacy support;
now depends on ZSTD_decompressStream() transparent legacy support
2016-08-28 08:46:25 -07:00
Yann Collet
87c18b2ebd fixed multiple minor warnings for XCode 2016-08-26 01:43:47 +02:00
Yann Collet
0baa64a763 increased maximum memory size for 64-bits bench to 16 GB 2016-08-25 22:54:13 +02:00
inikep
de9d13068f updated zstd_compression_format.md 2016-08-25 14:59:08 +02:00
inikep
0132375ba6 improved zstd_compression_format.md 2016-08-25 12:20:38 +02:00
inikep
637d33566d minor README.md corrections 2016-08-25 10:42:49 +02:00
inikep
ab2f7708c1 created programs\README.md 2016-08-25 10:07:20 +02:00
inikep
e416e30019 remove unnecessary comments 2016-08-24 17:32:09 +02:00
inikep
7bcdbcf51d Merge remote-tracking branch 'refs/remotes/Cyan4973/dev' into Other 2016-08-24 17:09:19 +02:00
Yann Collet
d1733f7417 fixed crc bug in rare timing conditions within bench.c 2016-08-21 01:04:46 +02:00
inikep
c629776b31 make clean will remove decompress/zstd_decompress.o 2016-08-19 10:45:59 +02:00
Yann Collet
b571a0eab4 Merge pull request #298 from inikep/Other
Other
2016-08-18 17:14:03 +02:00
inikep
b6514d2496 improved .gitignore 2016-08-18 16:53:29 +02:00
Yann Collet
49d105cfcf better warning and error messages in case of dictionary training failure (#292) 2016-08-18 15:02:11 +02:00
inikep
2868d565e4 test-related files moved to tests/ 2016-08-18 13:18:11 +02:00
Yann Collet
e80d15304a Merge pull request #296 from inikep/Other
Other
2016-08-18 11:48:48 +02:00
inikep
a7bb322a93 removed never referenced functions 2016-08-18 10:30:21 +02:00
inikep
5a54870047 fixed Intel Compiler warnings with Visual Studio
http://encode.ru/threads/2119-Zstandard?p=49504&viewfull=1#post49504
2016-08-18 09:00:25 +02:00
Yann Collet
bfdc34e5a3 Merge pull request #294 from inikep/Other
improved Makefiles
2016-08-17 19:41:56 +02:00
inikep
79b4062c81 fixed paramgrill dependency 2016-08-17 16:29:57 +02:00
inikep
d0c270fe85 improved programs\Makefile 2016-08-17 15:59:50 +02:00
inikep
78f3e0630b disabled %llu warnings with MinGW on Windows 2016-08-17 14:52:11 +02:00
Yann Collet
3d9211e961 Merge pull request #290 from david-y-lam/fix_file_name
Remove file name truncation in zstd CLI output
2016-08-17 14:05:29 +02:00
Yann Collet
53e17fbd5e updated streaming API 2016-08-17 01:39:22 +02:00
Yann Collet
94ca85d01b fixed Visual warning 2016-08-16 15:11:28 +02:00
Yann Collet
6263ba5451 fileio uses new streaming API 2016-08-16 15:11:28 +02:00
Yann Collet
fb5e385164 minor changes 2016-08-16 15:11:28 +02:00
Yann Collet
d7883a2c0e added zstreamtest 2016-08-16 15:11:28 +02:00
David Lam
0f2704581e Remove truncation of filename in zstd CLI log lines 2016-08-13 11:26:21 -07:00
David Lam
ac43e9582e Add more descriptive message to -v option in zstd CLI 2016-08-12 17:47:18 -07:00
Yann Collet
fab023010d changed test, in compliance with new --ultra policy 2016-08-12 19:00:18 +02:00
Yann Collet
fe0590f63f new --ultra policy 2016-08-12 18:04:15 +02:00
inikep
7132fb15ba bench.c: removed benchResult_t 2016-08-10 14:59:18 +02:00
inikep
3d2c58c3a9 fixed compilation with Visual in C++ mode 2016-08-10 14:28:47 +02:00
Yann Collet
666398e7ed added : xxhash namespace enforced from xxhash.h.
added : xxhash namespace test.
removed : -DXXH_NAMESPACE
2016-08-10 08:16:51 +02:00
Yann Collet
6a21971f4a bench : implemented avgSize 2016-08-03 00:06:24 +02:00
Yann Collet
bf2bc112bb bench : controlled display update when loading lot of files 2016-08-02 23:48:13 +02:00
Yann Collet
de4c04f6c2 Fixed : ZSTD_compress* can compress > 4 GB in a single pass, reported by Nick Terrell 2016-08-02 11:27:05 +02:00
Yann Collet
9a69ec4f3b added : resilience test for ZSTD_getErrorName() 2016-08-01 16:25:58 +02:00
Yann Collet
415251c63b minor style change 2016-08-01 14:26:49 +02:00
Yann Collet
a9febe81ae changed bench behavior for slow compression levels 2016-08-01 13:40:52 +02:00
Yann Collet
2a2ba3691c Merge pull request #266 from jrmarino/master
Enable build on FreeBSD ports (includes DragonFly BSD) [dev branch]
2016-07-31 02:21:26 +02:00
jrmarino
0d07ec0c0c Enable build on FreeBSD ports (includes DragonFly BSD)
Zstd has been introduced to FreeBSD ports
(http://www.freshports.org/archivers/zstd/) which DragonFly BSD also
uses.  FreeBSD and DragonFly use the install targets (albeit modified in
some cases) so they must be added to the associated Makefile filters.
2016-07-30 19:11:15 -05:00
Yann Collet
235911e13f removed "avg" evaluation from bench -q
removed "sleeping" notification from bench -q
2016-07-31 01:32:48 +02:00
Yann Collet
4c5bbf64f9 fixed : frame concatenation without checksum 2016-07-28 20:30:25 +02:00
Yann Collet
60ba31c570 zbuff uses ZSTD_compressEnd() 2016-07-28 19:55:09 +02:00
Yann Collet
62470b4bab Changed ZSTD_compressEnd() 2016-07-28 15:29:08 +02:00
Yann Collet
c991cc1828 new frame end, 32-bits checksums 2016-07-28 00:55:43 +02:00
Yann Collet
4110534886 ZSTD_maxCLevel() is promoted to "stable" API (#254, by @FrancescAlted) 2016-07-27 15:09:11 +02:00
Yann Collet
dd25a27702 added tutorial warning messages for dictBuilder 2016-07-27 12:43:09 +02:00
Yann Collet
fbd557d5c2 multi-files -t doesn't stop after detecting magic number read failure 2016-07-26 17:13:58 +02:00
Yann Collet
a1dd6b97d2 fixed null-length round trip 2016-07-26 16:44:09 +02:00
Yann Collet
7adc2328a3 fixed --test on zero-length files, reported by @amnilsson 2016-07-26 15:49:24 +02:00
Yann Collet
9cebec21e1 Merge pull request #259 from inikep/dev08
legacy decoder for v0.7 format
2016-07-26 15:13:05 +02:00
inikep
7bc5c6b5cb util.h: detect if an error occurs in readdir() (thanks to Jim Meyering) 2016-07-26 11:07:37 +02:00
Yann Collet
24a3d90bf0 strengthened integrity tests 2016-07-26 01:33:20 +02:00
Yann Collet
b402490546 fixed #260, reported by @amnilsson 2016-07-26 00:49:47 +02:00
inikep
fca90f8f60 legacy decoder for v0.7 format 2016-07-25 17:49:08 +02:00
Yann Collet
e5a817a2d8 better MOREFLAGS 2016-07-24 17:46:05 +02:00
Yann Collet
10b9c13d07 fixed doc on cLevel default, reported by Oliver Lange 2016-07-24 01:21:53 +02:00
Yann Collet
f8e7b5363f unified encoding types 2016-07-23 16:31:49 +02:00
Yann Collet
b752298d1d fixed 32-bits compilation 2016-07-22 14:37:09 +02:00
Yann Collet
32faf6c8e7 fixed conversion warnings 2016-07-22 14:37:09 +02:00
Yann Collet
5e45a5fbb3 force loop-align to 32 for zstd_decompress 2016-07-22 14:37:09 +02:00
Yann Collet
5288ac0cb7 changed filed order 2016-07-22 14:37:09 +02:00
Yann Collet
6fa05a2371 cBlockSize uses little-endian convention 2016-07-22 14:37:09 +02:00
Yann Collet
06dd74114a minor : long tests display progression status 2016-07-18 04:06:43 +02:00
Yann Collet
85f3919960 moved zstd.h to /lib 2016-07-17 20:42:21 +02:00
Yann Collet
988bcf360a -v and --verbose increase display level by 1 2016-07-15 19:43:30 +02:00
Yann Collet
d3d2db587e adapted fuzzer test to new blockSizeMax rule for ZSTD_compressBlock() 2016-07-15 12:20:26 +02:00
Yann Collet
227cc39e15 improved efficiency for large messages with small dictionaries 2016-07-15 11:27:09 +02:00
Yann Collet
e20d5cf117 fixed paramgrill 2016-07-14 20:46:24 +02:00
Yann Collet
17508f1a16 fixed a few minor coverity warnings 2016-07-14 17:18:20 +02:00
Yann Collet
69c2cdb45c fixed conversion warning 2016-07-14 16:52:45 +02:00
Yann Collet
44f684ded3 fixed minor coverity warning 2016-07-13 20:12:33 +02:00
Yann Collet
5e80dd3261 fixed minor coverity warnings 2016-07-13 19:21:57 +02:00
Yann Collet
158e7703bb reduced paramgrill dependency to C standard lib only 2016-07-13 16:45:24 +02:00
Yann Collet
2b1a3638e6 changed macro name to ZSTDCLI_CLEVEL_DEFAULT 2016-07-13 15:16:00 +02:00
Yann Collet
3c242e79d3 updated compression levels table 2016-07-13 14:56:24 +02:00
Yann Collet
2cac5b30b9 changed default compression level to 3 (can be modified with macro ZSTDCLI_DEFAULT_CLEVEL) 2016-07-13 14:15:08 +02:00
Yann Collet
696c4d7ef5 new paramgrill mode : -O# : find optimal parameters for a given sample and a given target speed 2016-07-13 13:11:08 +02:00
Yann Collet
650a8778c1 minor filter improvement 2016-07-13 11:49:05 +02:00
Yann Collet
a43a854cdb updated paramgrill 2016-07-12 13:42:10 +02:00
Yann Collet
45dc35628c first version of doubleFast 2016-07-12 09:47:31 +02:00
Yann Collet
3ae543ce75 added ZSTD_estimateCCtxSize() 2016-07-11 03:12:17 +02:00
Yann Collet
aa2628da30 added : ZSTD_insertBlock(), basic tests 2016-07-07 15:28:41 +02:00
Yann Collet
19c27d27f1 simplified legacy functions, no longer need magic number 2016-07-07 14:40:13 +02:00
Yann Collet
e72efeb0a1 removed "error_public.h" dependency from "zstd.h" 2016-07-07 14:17:40 +02:00
Yann Collet
f323bf7d32 added : ZSTD_getDecompressedSize() 2016-07-07 13:14:21 +02:00
Yann Collet
a3d03a3973 added <errno.h> dependency 2016-07-06 16:27:17 +02:00
Yann Collet
bcb5f77efa dictBuilder manages better samples of null size 0 and large size > 128 KB 2016-07-06 15:41:03 +02:00
Yann Collet
9ca73364e6 updated spec 2016-07-05 10:53:38 +02:00
Yann Collet
f9cac7a734 Added GNU separator --, to specifies that all following arguments are necessary file names (and not commands). Suggested by @chipturner (#230) 2016-07-04 18:18:24 +02:00
Yann Collet
92c986b4e8 fixed cmake error (missing errno) 2016-07-04 01:37:30 +02:00
Yann Collet
d916c908e0 updated doc 2016-07-04 00:42:58 +02:00
Yann Collet
440bb637e2 Merge pull request #238 from juanfra684/patch-2
Add OpenBSD to the Makefile test.
2016-07-04 00:38:19 +02:00
Juan Francisco Cantero Hurtado
06ad6f1911 Add OpenBSD to the Makefile test. 2016-07-03 22:16:00 +02:00
Juan Francisco Cantero Hurtado
fb5c59fc89 Redundant entry for options in the man page.
".SH OPTIONS" is enough.
2016-07-03 22:15:26 +02:00
Yann Collet
5cc1882d45 fixed minor visual warning 2016-07-03 19:03:13 +02:00
Yann Collet
c62cda9def fileio.c no longer depends on zstd_internal.h 2016-07-03 01:36:57 +02:00
Yann Collet
92d75667e4 fix for fast mode 2016-07-03 01:10:53 +02:00
Yann Collet
b2b5309c6f removes Visual warning on strerror() 2016-07-03 00:20:03 +02:00
Yann Collet
f4b7b747c7 -c does no longer modify displayLevel when -v set. 2016-07-02 22:57:28 +02:00
Yann Collet
ed7fb8413c extended use of strerror(errno) 2016-07-02 21:01:54 +02:00
Yann Collet
b71adf45c1 extended use of strerror(errno) 2016-07-02 01:51:12 +02:00
Yann Collet
b7f197633a use strerror(errno) to return system error message 2016-07-02 00:59:25 +02:00
Yann Collet
a7a5d7736c Updated doc 2016-07-02 00:37:32 +02:00
Yann Collet
cebab1d322 Explicit error message when dst file cannot be created / opened 2016-07-02 00:12:14 +02:00
Yann Collet
6c6e1751f6 use ZSTD_getParams() to simplify code 2016-06-27 15:28:45 +02:00