Skip to content

Commit

Permalink
Merge pull request #73 from juntyr/patch-1
Browse files Browse the repository at this point in the history
Guarantee that decompress doesn't modify the compressed data
  • Loading branch information
ayzk authored Dec 18, 2024
2 parents 88095a8 + f67f914 commit 1c46e07
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/SZ3/api/sz.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ char *SZ_compress(const SZ3::Config &config, const T *data, size_t &cmpSize) {
*/
template <class T>
void SZ_decompress(SZ3::Config &config, char *cmpData, size_t cmpSize, T *&decData) {
void SZ_decompress(SZ3::Config &config, const char *cmpData, size_t cmpSize, T *&decData) {
using namespace SZ3;
auto cmpConfPos = reinterpret_cast<const uchar *>(cmpData);
config.load(cmpConfPos);
Expand Down Expand Up @@ -160,7 +160,7 @@ void SZ_decompress(SZ3::Config &config, char *cmpData, size_t cmpSize, T *&decDa
float decompressedData = SZ_decompress(conf, cmpData, cmpSize)
*/
template <class T>
T *SZ_decompress(SZ3::Config &config, char *cmpData, size_t cmpSize) {
T *SZ_decompress(SZ3::Config &config, const char *cmpData, size_t cmpSize) {
using namespace SZ3;
T *decData = nullptr;
SZ_decompress<T>(config, cmpData, cmpSize, decData);
Expand Down

0 comments on commit 1c46e07

Please sign in to comment.