MCPcopy Create free account
hub / github.com/OpenBoardView/OpenBoardView / decode_bdv

Function decode_bdv

src/openboardview/FileFormats/BDVFile.cpp:9–18  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7#include <cstring>
8
9void decode_bdv(char *buf, size_t buffer_size) {
10 int count = 0xa0; // First key
11 for (size_t i = 0; i < buffer_size; i++) {
12 if (buf[i] == '\r' && buf[i + 1] == '\n') count++; // Increment key on each new line
13 char x = buf[i];
14 if (!(x == '\r' || x == '\n' || !x)) x = count - x;
15 if (count > 285) count = 159;
16 buf[i] = x;
17 }
18}
19
20bool BDVFile::verifyFormat(std::vector<char> &buf) {
21 return find_str_in_buf("dd:1.3?,r?-=bb", buf) ||

Callers 1

BDVFileMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected