~ubuntu-branches/ubuntu/vivid/adios/vivid-proposed

« back to all changes in this revision

Viewing changes to src/transforms/adios_transform_zlib_write.c

  • Committer: Package Import Robot
  • Author(s): Alastair McKinstry
  • Date: 2014-06-16 23:06:38 UTC
  • mfrom: (15.1.8 sid)
  • Revision ID: package-import@ubuntu.com-20140616230638-cxryhot6b8ge32l6
Tags: 1.7.0-1
* New upstream release.
* Add adios.pc pkgconfig file. adios_config now uses this.

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
 
14
14
#include "zlib.h"
15
15
 
 
16
#if 0
16
17
static int is_digit_str(char* input_str)
17
18
{
18
19
    if(strlen(input_str) > 2)    // at most 2 digits for zlib
30
31
    }
31
32
    return 1;
32
33
}
 
34
#endif
33
35
 
34
36
int compress_zlib_pre_allocated(const void* input_data,
35
37
                                const uint64_t input_len,
76
78
    assert(var->transform_type == adios_transform_zlib);
77
79
 
78
80
    // Get the input data and data length
79
 
    const uint64_t input_size = adios_transform_get_pre_transform_var_size(fd->group, var);
 
81
    const uint64_t input_size = adios_transform_get_pre_transform_var_size(var);
80
82
    const void *input_buff= var->data;
81
83
 
82
84
    // parse the compressiong parameter
105
107
    uint64_t output_size = input_size; // for compression, at most the original data size
106
108
    void* output_buff = NULL;
107
109
 
108
 
    uint64_t mem_allowed = 0;
109
110
    if (use_shared_buffer)    // If shared buffer is permitted, serialize to there
110
111
    {
111
112
        *wrote_to_shared_buffer = 1;