                             let bytesPerPixel = bitmap.bitsPerPixel >> 3
                             let pixelShift = _bitsOffset & 7
                             
+                            @inline(__always)
                             func pixelByte(_ i: Int) -> UInt8 {
                                 switch bitmap.endianness {
                                 case .big: return pixelShift == 0 ? source[i] : (source[i] << pixelShift) | (source[i + 1] >> (8 - pixelShift))

            }
        }
        
        func swapPixel(_ data: inout Data) {
            
            data.withUnsafeMutableBytes { (buffer: UnsafeMutablePointer<UInt8>) in

                                let channelShift = channel.bitRange.lowerBound & 7
                                let bytesPerChannel = channel.bitRange.count >> 3
                                
                                @inline(__always)
                                func channelByte(_ i: Int) -> UInt8 {
                                    switch channel.endianness {
                                    case .big: return channelShift == 0 ? pixelByte(i + channelBytesOffset) : (pixelByte(i + channelBytesOffset) << channelShift) | (pixelByte(i + 1 + channelBytesOffset) >> (8 - channelShift))
