mirror of
https://github.com/apple/swift-nio
synced 2026-11-26 04:57:49 +00:00
* Initial implementation of hexdump for ByteBuffer * Put that iff back there * Reword hexDumpShort(): naming, tests, offset and full length support * Use writerIndex to figure out the convinience end of useful content in the buffer * hexDumpLong(offset:) — supports offset, and reads full buffer slice, not just readableBytes * hexDumpLong() extra line failing test * Using ByteBuffer(string:) instead of the allocator * Move hexDumps code into ByteBuffer-hexdump.swift * Optimized String(byte: poadding:) * Avoid using storage.dumpBytes in hexDumpShort() * Implemented a cleaner long hexdump * Implemented the public hexdump API * Revert ByteBuffer-core.swift to main * Addressed review feedback! * hexdump long format with clipped length * reserve capacity in hexDumpLines * Addressing review feedback * String(_ value, radix, padding) and the final test case * Make the hexDump(format: .detailed) format cleaner * Spell out if let for Swift 5.8 * Fixed a formatting bug in multiline maxBytes detailed format * Apply suggestions from code review Co-authored-by: George Barnett <gbarnett@apple.com> * Cleaner way to dump a line in .detailed format * Cleaner generic argument type for String(_, radix:, padding:) * Revert _storage.dumpBytes test to match previous format * Simplify printable bytes closure to a single expression so Swift 5.6 is happy --------- Co-authored-by: Johannes Weiss <johannesweiss@apple.com> Co-authored-by: George Barnett <gbarnett@apple.com> Co-authored-by: Cory Benfield <lukasa@apple.com>