Change the class/function name, we are using it algo for encoding
Refactor: indexOf deleted, now using _findIndex for consistency with buffers
Write more tests. Refactor tests with beforeEach function. Change cursor name to _cursor