MCPcopy Create free account
hub / github.com/RobTillaart/Arduino / add

Method add

libraries/Adler/Adler32.cpp:40–50  ·  view source on GitHub ↗

optimized version (~10% faster)

Source from the content-addressed store, hash-verified

38
39// optimized version (~10% faster)
40void Adler32::add(uint8_t value)
41{
42 _count++;
43 _s1 += value;
44 _s2 += _s1;
45 if (_s2 >= ADLER32_MOD_PRIME)
46 {
47 _s2 -= ADLER32_MOD_PRIME;
48 if (_s1 >= ADLER32_MOD_PRIME) _s1 -= ADLER32_MOD_PRIME;
49 }
50}
51
52
53// straightforward going through the array.

Callers 2

unittestFunction · 0.45
unittestFunction · 0.45

Calls

no outgoing calls

Tested by 2

unittestFunction · 0.36
unittestFunction · 0.36