nlib
|
Implements a library for open-source software (OSS), code derived from OSS, and for accessing OSS. More...
Classes | |
class | Lz4InputStream |
The stream class to read data according to the LZ4 frame format. More... | |
class | Lz4InputStreamSettings |
The class to obtain and configure the Lz4InputStream settings. As of now this class is empty. More... | |
class | Lz4OutputStream |
The stream class to write data according to the LZ4 frame format. More... | |
class | Lz4OutputStreamSettings |
The class to obtain and configure the Lz4OutputStream settings. More... | |
Functions | |
errno_t | BsDiffZ (OutputStream *patch, void *old_data, size_t old_size, void *new_data, size_t new_size) noexcept |
Creates a patch to update from the old data to the new data. More... | |
errno_t | BsPatchZ (OutputStream *new_stream, void *old_data, size_t old_size, void *patch_data, size_t patch_size) noexcept |
Creates new data from the old data and the patch data. More... | |
Implements a library for open-source software (OSS), code derived from OSS, and for accessing OSS.
heap
library must be linked in addition to the misc
library because the code included in each oss
library internally uses nmalloc/nfree
. nmalloc
and nfree
are used because there is a risk of denial of service attacks that use fragmentation when you use the default SDK functions malloc
and free
.bsdiff(http://www.daemonology.net/bsdiff/)
contains the library modified to use zlib
rather than bzlib2
. In addition, bsdiff_z.exe
and bspatch_z.exe
are provided as command-line programs. bsdiff
. SQLite3(https://www.sqlite.org/)
includes a version of nlib
modified to run on I/F. SQLITE_DEBUG_OS_TRACE
is enabled during compilation. The command-line shell is sqlite3_nlib.exe
. mem1.c
, os_win.c
, and mutex_w32.c
as independent code that uses nLib. LZ4
library (https://github.com/Cyan4973/lz4) with the LZ4 algorithm for high-speed compression and decompression. Does not include an LZ4 command-line program.
|
noexcept |
Creates a patch to update from the old data to the new data.
[in] | patch | The stream where patch data is written to. |
[in] | old_data | Pointer to the old binary data that needs to be updated. |
[in] | old_size | The size of the old binary data. |
[in] | new_data | Pointer to the new binary data. |
[in] | new_size | The size of the new binary data. |
0
on success.bsdiff
and bspatch
are widely used for creating and applying patches to binary data. In this library, a library conversion is run so that bsdiff
and bspatch
use zlib
rather than bzlib2
as the method of data compression. zlib
is used rather than bzlib2
, the data created by bsdiff
is different. The header signature is changed from BSDIFF40
to bsdiff40
. You can also use the command-line program bsdiff_z
to execute this function.
|
noexcept |
Creates new data from the old data and the patch data.
[in] | new_stream | The stream that the new data should be written into. |
[in] | old_data | Pointer to the old binary data that needs to be updated. |
[in] | old_size | The size of the old binary data. |
[in] | patch_data | Pointer to the patch data. |
[in] | patch_size | The size of the patch data. |
0
on success.BsDiffZ
function and to get new data from the old data. You can also use the command-line program bspatch_z
to execute this function. © 2013, 2014, 2015 Nintendo Co., Ltd. All rights reserved.