Skip to content

Commit

Permalink
tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
cldellow committed Oct 6, 2024
1 parent c5286dd commit 86dffe5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,6 @@ install:
install -m 0755 tile-smush $(DESTDIR)$(prefix)/bin/

clean:
rm -f tile-smush src/*.o src/external/*.o include/*.o include/*.pb.h server/*.o test/*.o rm test.*
rm -f tile-smush src/*.o src/external/*.o include/*.o include/*.pb.h server/*.o test/*.o rm test.* src/external/libdeflate/lib/*.o ./src/external/libdeflate/lib/*/*.o

.PHONY: install
1 change: 1 addition & 0 deletions src/helpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ std::string compress_string(const std::string& str,
size_t maxSize = libdeflate_gzip_compress_bound(compressor.compressor, str.size());
rv.resize(maxSize);

//std::cout << "compressing str with size " << std::to_string(str.size()) << " maxSize=" << std::to_string(maxSize) << " rv.size()=" << std::to_string(rv.size()) << std::endl;
size_t compressedSize = libdeflate_gzip_compress(compressor.compressor, str.data(), str.size(), &rv[0], maxSize);
if (compressedSize == 0)
throw std::runtime_error("libdeflate_gzip_compress failed");
Expand Down
2 changes: 1 addition & 1 deletion src/tile-smush.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ int main(const int argc, const char* argv[]) {

std::string buffer;
builder.serialize(buffer);
std::string compressed = compress_string(buffer, 9, true);
std::string compressed = compress_string(buffer, 6, true);
merged.saveTile(zoom, x, y, &compressed, false);
}
}
Expand Down

0 comments on commit 86dffe5

Please sign in to comment.