mirror of
https://github.com/apple/swift-nio
synced 2026-11-25 04:47:49 +00:00
Motivation: Previously, ByteBuffer tried to never copy the bytes when transferring to a `Data`. For small copies that's definitely not a good choice because it means an extra allocation. Modifications: - introduce `ByteTransferStrategy` so the user can choose - make a heuristic: copy is less than 256kB, try not to copy above Result: More sensible defaults.