| 73 | } |
| 74 | |
| 75 | void WriteOptimizedByteString(const std::shared_ptr<WriteStream>& stream, const char* data, |
| 76 | size_t length, size_t literalExtras) { |
| 77 | const size_t hexLength = 2 + (2 * length); |
| 78 | const size_t literalLength = 2 + length + literalExtras; |
| 79 | if (literalLength <= hexLength) { |
| 80 | WriteLiteralByteString(stream, data, length); |
| 81 | } else { |
| 82 | WriteHexByteString(stream, data, length); |
| 83 | } |
| 84 | } |
| 85 | |
| 86 | void WriteByteString(const std::shared_ptr<WriteStream>& stream, const char* data, size_t length) { |
| 87 | size_t literalExtras = 0; |
no test coverage detected