8 // Copies from src to dst, removing all instances of 0xFF 0xF0.
11 // Number of bytes written to dst if successful.
12 // -1 if a marker was encountered (0xFF followed by something else than 0xF0).
13 // -1 if the last byte of "src" was 0xFF.
15 typedef int (unstuff_func_t)(uint8_t*, const uint8_t*, size_t);
17 // Slow reference function.
18 int unstuff_reference(uint8_t* dst, const uint8_t* src, size_t len);
20 // Faster version (assuming few stuff bytes), using C standard library
21 // functions (that are hopefully more efficient, assuming few stuff bytes)
22 // to find the markers.
23 // Slightly over twice as fast as unstuff_reference().
24 int unstuff_fast(uint8_t* dst, const uint8_t* src, size_t len);
26 // SSE4.1 version working on 16 bytes at a time.
27 // 5-10% faster than unstuff_fast().
28 int unstuff_sse41(uint8_t* dst, const uint8_t* src, size_t len);
30 #endif /* !defined(_UNSTUFF_H) */