MCPcopy Create free account
hub / github.com/davidgiven/fluxengine / swab

Method swab

lib/core/bytes.cc:272–287  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

270}
271
272Bytes Bytes::swab() const
273{
274 Bytes output;
275 ByteWriter bw(output);
276 ByteReader br(*this);
277
278 while (!br.eof())
279 {
280 uint8_t a = br.read_8();
281 uint8_t b = br.read_8();
282 bw.write_8(b);
283 bw.write_8(a);
284 }
285
286 return output;
287}
288
289Bytes Bytes::compress() const
290{

Callers 1

decodeSectorRecordMethod · 0.80

Calls 2

read_8Method · 0.80
eofMethod · 0.45

Tested by

no test coverage detected