(chunk)
| 54 | |
| 55 | // Stateless uppercase transform (shared by all paths) |
| 56 | function uppercaseChunk(chunk) { |
| 57 | const buf = Buffer.allocUnsafe(chunk.length); |
| 58 | for (let i = 0; i < chunk.length; i++) { |
| 59 | const b = chunk[i]; |
| 60 | buf[i] = (b >= 0x61 && b <= 0x7a) ? b - 0x20 : b; |
| 61 | } |
| 62 | return buf; |
| 63 | } |
| 64 | |
| 65 | // --------------------------------------------------------------------------- |
| 66 | // Classic streams path: createReadStream -> Transform (upper) -> createGzip |