Integrate LZ4 library, compress the ramdisk
All checks were successful
Build documentation / build-and-deploy (push) Successful in 1m53s

This commit is contained in:
2026-03-07 02:54:26 +01:00
parent eaec32975a
commit b9e8a8bf1d
234 changed files with 52373 additions and 13 deletions

View File

@@ -9,13 +9,13 @@ size_t memset (void* dst, uint8_t b, size_t n) {
return i;
}
size_t memcpy (void* dst, const void* src, size_t n) {
void* memcpy (void* dst, const void* src, size_t n) {
uint8_t* dst1 = dst;
const uint8_t* src1 = src;
size_t i;
for (i = 0; i < n; i++)
dst1[i] = src1[i];
return i;
return dst;
}
// SOURCE: https://stackoverflow.com/a/48967408
@@ -92,3 +92,24 @@ char* strncat (char* dest, const char* src, size_t n) {
*ptr = '\0';
return dest;
}
void* memmove (void* dest, const void* src, unsigned int n) {
unsigned char isCopyRequire = 0; // flag bit
char* pcSource = (char*)src;
char* pcDstn = (char*)dest;
// return if pcDstn and pcSource is NULL
if ((pcSource == NULL) || (pcDstn == NULL)) {
return NULL;
}
// overlap buffer
if ((pcSource < pcDstn) && (pcDstn < pcSource + n)) {
for (pcDstn += n, pcSource += n; n--;) {
*--pcDstn = *--pcSource;
}
} else {
while (n--) {
*pcDstn++ = *pcSource++;
}
}
return dest;
}