https://github.com/sumotoy/gpio_MCP23S17
This is an extract of my other library on github that is able to drive at list 25 other GPIO expander from different brands, I2C or SPI and I will adapt soon for use with ESP8266.
The library can be easily included in other libraries and has many examples.