Added a simple implementation of the SpaceSaving algorithm to be used instead of the stream-lib version.