3 Commits (01bcb9404b0b9c0e11ef391b3c26c8d1f77a6374)

Author SHA1 Message Date
Dan Čermák fec6535ae8 [binaryToString] Reimplement using Slices
- reimplement binaryToString:
  - it now accepts a Slice and nothing else
  - it does not return a std::string but instead a proxy object that implements
    operator<< (this should be more efficient, as we do not need to touch the
    heap in most cases)
- addapt unit tests
- replace all occurences with the new API
7 years ago
Dan Čermák a48d0347b7 [binaryToString] Fixed overread when passing start > 0
binaryToString(DataBuf&) only calls the C-array version. Unfortunately, its
safety check is flawed, as it only works when start is 0 (probably due to its
conterintuitive interface).
binaryToString(byte*) formats the range (start,start+size) => we have to trimm
size if size + start is larger than the DataBuf's size_
7 years ago
Dan Čermák 7a7ae7a1df [image_int] Move internal functions into separate translation unit 7 years ago