diff --git a/CHANGELOG.md b/CHANGELOG.md index 266f77f1b492eb8c907da70857911e685ca96ca7..29223a7b529a26aa41730d100f1df61a17e1b0c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,15 @@ # libaec Changelog All notable changes to libaec will be documented in this file. +## [1.1.0] + +### Changed +- Rename aec executable to graec. This avoids a name clash with the + library itself in cmake builds using the Ninja + generator. Furthermore, the executable and its manpage will not be + installed any more since it is mainly used for internal testing and + benchmarking. + ## [1.0.6] - 2021-09-17 ### Changed diff --git a/README.md b/README.md index 46effa32774d01c4bc50039219f919803d60dbe4..c976d7a05f12cc9103062b9d6a54a61544e3323c 100644 --- a/README.md +++ b/README.md @@ -151,12 +151,12 @@ are no alignment requirements for these buffers. ### Flushing: `aec_encode` can be used in a streaming fashion by chunking input and -output and specifying `AEC_NO_FLUSH`. The function will return if either -the input runs empty or the output buffer is full. The calling -function can check `avail_in` and `avail_out` to see what occurred. The -last call to `aec_encode()` must set `AEC_FLUSH` to drain all -output. [aec.c](src/aec.c) is an example of streaming usage of encoding and -decoding. +output and specifying `AEC_NO_FLUSH`. The function will return if +either the input runs empty or the output buffer is full. The calling +function can check `avail_in` and `avail_out` to see what +occurred. The last call to `aec_encode()` must set `AEC_FLUSH` to +drain all output. [graec.c](src/graec.c) is an example of streaming +usage of encoding and decoding. ### Output: diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b434426e362e4207104ba8c7d19f48a41ada6aa1..c664efa14d29f8bed911b1799d5d73942964d948 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -47,11 +47,9 @@ set_target_properties(sz_shared OUTPUT_NAME $<IF:$<BOOL:${MSVC}>,szip,sz> PUBLIC_HEADER ../include/szlib.h) -# Simple client for testing and benchmarking. -# Can also be used stand-alone -add_executable(aec_client aec.c) -set_target_properties(aec_client PROPERTIES OUTPUT_NAME aec) -target_link_libraries(aec_client PUBLIC aec) +# Simple executable for testing and benchmarking. +add_executable(graec graec.c) +target_link_libraries(graec aec) include(GNUInstallDirs) if(UNIX) @@ -70,15 +68,7 @@ if(UNIX) COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/benc.sh ${CMAKE_CURRENT_SOURCE_DIR}/../data/typical.rz COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/bdec.sh - DEPENDS aec_client utime) + DEPENDS graec utime) endif() -if(UNIX OR MINGW) - # Install manpage - install( - FILES aec.1 - DESTINATION ${CMAKE_INSTALL_FULL_MANDIR}/man1 - COMPONENT doc) -endif() - -install(TARGETS aec_static aec_shared sz_static sz_shared aec_client) +install(TARGETS aec_static aec_shared sz_static sz_shared) diff --git a/src/Makefile.am b/src/Makefile.am index 47ce42ce60efcce006ecfb6261aa92fcfe2e97d1..084b2376dc1979d7c92b5bf8a19948ac309d89bc 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,3 +1,4 @@ +AUTOMAKE_OPTIONS = no-installman AM_CFLAGS = $(CFLAG_VISIBILITY) AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include \ -DBUILDING_LIBAEC @@ -12,12 +13,11 @@ libsz_la_LDFLAGS = -version-info 2:1:0 -no-undefined include_HEADERS = $(top_builddir)/include/libaec.h $(top_srcdir)/include/szlib.h -bin_PROGRAMS = aec -noinst_PROGRAMS = utime +noinst_PROGRAMS = utime graec utime_SOURCES = utime.c -aec_LDADD = libaec.la -aec_SOURCES = aec.c -dist_man_MANS = aec.1 +graec_LDADD = libaec.la +graec_SOURCES = graec.c +dist_man_MANS = graec.1 EXTRA_DIST = CMakeLists.txt benc.sh bdec.sh CLEANFILES = bench.dat bench.rz diff --git a/src/bdec.sh b/src/bdec.sh index 5b473d87e6206c8c79e546470aa582652375646d..bab7124442ba285bed08c510cae5eb3e0d295b49 100755 --- a/src/bdec.sh +++ b/src/bdec.sh @@ -6,7 +6,7 @@ if [ ! -f bench.rz ]; then fi rm -f dec.dat bsize=$(wc -c bench.dat | awk '{print $1}') -utime=$(./utime ./aec -d -n16 -j64 -r256 -m bench.rz dec.dat 2>&1) +utime=$(./utime ./graec -d -n16 -j64 -r256 -m bench.rz dec.dat 2>&1) perf=$(awk "BEGIN {print ${bsize}/1048576/${utime}}") echo "[0;32m*** Decoding with $perf MiB/s user time ***[0m" cmp bench.dat dec.dat diff --git a/src/benc.sh b/src/benc.sh index 5bc031cdbfb5cff55c1077e87701b3cfd5f78d3f..1a2b72fdfecf26c06a63ed8f6b8fcbab91ade104 100755 --- a/src/benc.sh +++ b/src/benc.sh @@ -1,10 +1,10 @@ #!/bin/sh set -e TEST_DATA=$1 -AEC=./aec +GRAEC=./graec if [ ! -f bench.dat ]; then rm -f typical.dat - $AEC -d -n16 -j64 -r256 -m $TEST_DATA typical.dat + $GRAEC -d -n16 -j64 -r256 -m $TEST_DATA typical.dat for i in $(seq 0 499); do cat typical.dat >> bench.dat @@ -12,8 +12,7 @@ if [ ! -f bench.dat ]; then rm -f typical.dat fi rm -f bench.rz -utime=$(./utime $AEC -n16 -j64 -r256 -m bench.dat bench.rz 2>&1) -echo $utime +utime=$(./utime $GRAEC -n16 -j64 -r256 -m bench.dat bench.rz 2>&1) bsize=$(wc -c bench.dat | awk '{print $1}') perf=$(awk "BEGIN {print ${bsize}/1048576/${utime}}") echo "[0;32m*** Encoding with $perf MiB/s user time ***[0m" diff --git a/src/aec.1 b/src/graec.1 similarity index 85% rename from src/aec.1 rename to src/graec.1 index e4c489dff596c7133219df12b2c2c8984ddbaf98..1f33a752eb0da90db614c78931e4fd4bb13c20d6 100644 --- a/src/aec.1 +++ b/src/graec.1 @@ -1,8 +1,8 @@ -.TH AEC 1 +.TH GRAEC 1 .SH NAME -aec \- compress or expand files +graec \- compress or expand files .SH SYNOPSIS -.B aec +.B graec [\fB\-3\fR] [\fB\-b\fR \fIBYTES\fR] [\fB\-d\fR] @@ -17,9 +17,10 @@ aec \- compress or expand files .IR infile .IR outfile .SH DESCRIPTION -.IR Aec -performs lossless compression and decompression with Golomb-Rice coding -as defined in the Space Data System recommended standard 121.0-B-3. +.IR Graec +performs lossless compression and decompression with Golomb-Rice +adaptive entropy coding as defined in the Space Data System +recommended standard 121.0-B-3. .SH OPTIONS .TP \fB \-3\fR diff --git a/src/aec.c b/src/graec.c similarity index 100% rename from src/aec.c rename to src/graec.c diff --git a/tests/sampledata.sh b/tests/sampledata.sh index 73cc041b6a8d89aa7581316a88a5edddaa1579fa..c6ea8ccfaae88f4bb1c1601a5b28d593131f1f3c 100755 --- a/tests/sampledata.sh +++ b/tests/sampledata.sh @@ -5,7 +5,7 @@ # expected. # set -e -AEC="../src/aec" +GRAEC="../src/graec" if [ -n "$1" ]; then srcdir=$1 fi @@ -19,17 +19,17 @@ filesize () { } decode () { - "$AEC" -d $3 "$1" test.dat + "$GRAEC" -d $3 "$1" test.dat dd if=test.dat bs=1 count=$(filesize "$2") | cmp "$2" - } code () { - "$AEC" $3 "$2" test.rz + "$GRAEC" $3 "$2" test.rz cmp "$1" test.rz } code_size () { - "$AEC" $3 "$2" test.rz + "$GRAEC" $3 "$2" test.rz if [ ! $(filesize test.rz) -eq $(filesize "$1") ]; then echo "$1 size mismatch" exit 1