implement with buffer
remove unused slice + update tests
fix cyst output length error
add test
indent space
coding style
Merge pull request #1 from frankleromain/master

implement with buffer