Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes several changes to the
emscripten
project, focusing on refactoring thecompressZip
function, updating dependencies, and modifying bindings and initialization code, and very important solve issue #18 . The most important changes include removing theextern "C"
block, updating thecompressZip
function signature, and modifying thepackage.json
dependencies.Refactoring and Function Signature Changes:
emscripten/markerCompress.cpp
: Removed theextern "C"
block and changed thecompressZip
function signature fromuint
toint
. [1] [2]emscripten/markerCompress.h
: Added include guards and updated thecompressZip
function signature fromuint
toint
.Dependency Updates:
package.json
: Updated theprettier
dependency version from^3.3.3
to3.4.1
.Bindings and Initialization Code Modifications:
emscripten/markerCreator_bindings.cpp
: Added a new binding for thecompressZip
function and refactored thecreateNftDataSet_em
function for better readability.src/NFTMarkerCreator.js
: Modified thecompressZip
call to use the new function signature and updated the way the string length is calculated.tools/makem.js
: Removed_compressZip
from the exported functions list and addedlengthBytesUTF8
to the exported runtime methods.This pull request includes several changes to theemscripten
project, focusing on refactoring thecompressZip
function and related bindings, as well as updating the build configuration. The most important changes include modifying thecompressZip
function, updating the header file, adjusting the Emscripten bindings, and refining the build scripts.Refactoring and Function Updates:
emscripten/markerCompress.cpp
: Refactored thecompressZip
function by removing theextern "C"
block and changing the return type toint
. Reordered the include statements for better organization. [1] [2]emscripten/markerCompress.h
: Updated the header guard and removed theextern "C"
block to match the changes in the implementation file. Changed the return type ofcompressZip
toint
.Emscripten Bindings:
emscripten/markerCreator_bindings.cpp
: Added a new binding for thecompressZip
function to be accessible from JavaScript. Reformatted the existingcreateNftDataSet_em
function for better readability.Build Script Adjustments:
tools/makem.js
: Updated the build script to remove the direct inclusion oflibz.a
and instead use the-sUSE_ZLIB=1
flag. Also adjusted the exported functions and runtime methods to reflect the changes in thecompressZip
function. [1] [2] [3]Integration in Marker Creator:
emscripten/markerCreator.cpp
: Included themarkerCompress.h
header to integrate thecompressZip
function.src/NFTMarkerCreator.js
: Modified the function call tocompressZip
to use the new binding and updated the memory allocation for the string buffer.