LibJuno
0.30.0
LibJuno is a lightweight C99 library designed specifically for embedded systems.
Loading...
Searching...
No Matches
juno_zip.c
Go to the documentation of this file.
1
/*
2
MIT License
3
4
Copyright (c) 2025 Robin A. Onsay
5
6
Permission is hereby granted, free of charge, to any person obtaining
7
a copy of this software and associated documentation files
8
(the "Software"), to deal in the Software without restriction,
9
including without limitation the rights to use, copy, modify, merge,
10
publish, distribute, sublicense, and/or sell copies of the Software,
11
and to permit persons to whom the Software is furnished to do so,
12
subject to the following conditions:
13
14
The above copyright notice and this permission notice shall be
15
included in all copies or substantial portions of the Software.
16
*/
17
#include "
juno/crc/crc.h
"
18
#include <stdio.h>
19
#include "
zip.h
"
20
21
uint32_t
Juno_CrcZipUpdate
(uint32_t iCrc,
const
void
*pcData,
size_t
zDataSize)
22
{
23
register
uint32_t crc = iCrc;
24
register
const
uint8_t *cp = pcData;
25
register
size_t
cnt = zDataSize;
26
27
while
(cnt--) {
28
crc=((crc>>8)&
M1_32
)^zip_crctab[(crc&0xff)^*cp++];
29
}
30
31
return
(crc ^ 0xFFFFFFFF);
32
}
crc.h
M1_32
#define M1_32
Definition
crc.h:27
Juno_CrcZipUpdate
uint32_t Juno_CrcZipUpdate(uint32_t iCrc, const void *pcData, size_t zDataSize)
Definition
juno_zip.c:21
zip.h
src
crc
juno_zip.c
Generated by
1.9.8