Skip to content

Commit

Permalink
libpressio version 0.6.3
Browse files Browse the repository at this point in the history
Bug Fixes:
- Previously the static library was built by default, not the
  shared library is built by default, and this is now configurable.
- Previously the metrics/size plugin required decompression to compute
  compression ratio unnecessarily, now only compression is required.
  • Loading branch information
robertu94 committed Aug 6, 2019
1 parent 1dd4373 commit 25bd0ce
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
project(libpressio VERSION "0.6.2" LANGUAGES CXX C)
project(libpressio VERSION "0.6.3" LANGUAGES CXX C)

enable_testing()
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
option(BUILD_SHARED_LIBS "build libpressio as a shared library" ON)

include(GNUInstallDirs)
find_package(ZFP REQUIRED)
Expand Down
8 changes: 4 additions & 4 deletions src/plugins/metrics/size.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
class size_plugin : public libpressio_metrics_plugin {
public:

void begin_compress(struct pressio_data const* input, pressio_data *const*) override {
void end_compress(struct pressio_data const* input, pressio_data *const* output, int) override {
uncompressed_size = pressio_data_get_bytes(input);
compressed_size = pressio_data_get_bytes(*output);
compression_ratio = static_cast<double>(*uncompressed_size)/ *compressed_size;
}

void end_decompress(struct pressio_data const* input, pressio_data *const* output, int) override {
compressed_size = pressio_data_get_bytes(input);
void end_decompress(struct pressio_data const* , pressio_data *const* output, int) override {
decompressed_size = pressio_data_get_bytes(*output);
compression_ratio = static_cast<double>(*decompressed_size)/ *compressed_size;
}

struct pressio_options* get_metrics_results() const override {
Expand Down

0 comments on commit 25bd0ce

Please sign in to comment.