# Pipeline

Library for handling pipeline operations that copy and paste data between operations

*Uses bit manipulation and assembly for efficient data movement*

## Functions

### pipe

Process pipeline operations by copying data between operations

```solidity
function pipe(bytes memory data, CalldataReader reader, bytes[] memory results)
    internal
    pure
    returns (CalldataReader);
```

**Parameters**

| Name      | Type             | Description                                      |
| --------- | ---------------- | ------------------------------------------------ |
| `data`    | `bytes`          | The calldata to modify                           |
| `reader`  | `CalldataReader` | Current position in the calldata                 |
| `results` | `bytes[]`        | Array of previous operation results to copy from |

**Returns**

| Name     | Type             | Description                                                          |
| -------- | ---------------- | -------------------------------------------------------------------- |
| `<none>` | `CalldataReader` | Updated CalldataReader position after processing pipeline operations |

## Errors

### Aera\_\_CopyOffsetOutOfBounds

Thrown when trying to copy from an invalid position in source data

```solidity
error Aera__CopyOffsetOutOfBounds();
```

### Aera\_\_PasteOffsetOutOfBounds

Thrown when trying to paste to an invalid position in target data

```solidity
error Aera__PasteOffsetOutOfBounds();
```
