# BytesLib

### Functions <a href="#functions" id="functions"></a>

#### slice <a href="#slice" id="slice"></a>

```solidity
function slice(bytes memory _bytes, uint256 _start, uint256 _length) internal pure returns (bytes memory);
```

#### toAddress <a href="#toaddress" id="toaddress"></a>

```solidity
function toAddress(bytes memory _bytes, uint256 _start) internal pure returns (address addr);
```

#### toBool <a href="#tobool" id="tobool"></a>

```solidity
function toBool(bytes memory _bytes, uint256 _start) internal pure returns (bool);
```

#### toAddressAddressBoolUint128Uint128 <a href="#toaddressaddressbooluint128uint128" id="toaddressaddressbooluint128uint128"></a>

```solidity
function toAddressAddressBoolUint128Uint128(bytes memory _bytes)
    internal
    pure
    returns (address addr1, address addr2, bool bool_, uint128 amount1, uint128 amount2);
```

### Errors <a href="#errors" id="errors"></a>

#### BytesLibToBoolOutOfBounds <a href="#byteslibtobooloutofbounds" id="byteslibtobooloutofbounds"></a>

```solidity
error BytesLibToBoolOutOfBounds();
```

#### BytesLibToAddressOutOfBounds <a href="#byteslibtoaddressoutofbounds" id="byteslibtoaddressoutofbounds"></a>

```solidity
error BytesLibToAddressOutOfBounds();
```

#### BytesLibSliceOverflow <a href="#byteslibsliceoverflow" id="byteslibsliceoverflow"></a>

```solidity
error BytesLibSliceOverflow();
```

#### BytesLibSliceOutOfBounds <a href="#byteslibsliceoutofbounds" id="byteslibsliceoutofbounds"></a>

```solidity
error BytesLibSliceOutOfBounds();
```

#### BytesLibInvalidLength <a href="#byteslibinvalidlength" id="byteslibinvalidlength"></a>

```solidity
error BytesLibInvalidLength(uint256 inputLength, uint256 expectedLength);
```

<br>
