haskell/bytestring — pull request #12 by DaveCTurner (2014-02-27 12:24:37+00:00)
Title: Added Data.ByteString.Lazy.elemIndexEnd implementation

Had a number of options for this implementation. This one doesn't keep hold of chunks longer than it needs to, but because of this it has to call S.elemIndexEnd on each chunk before it is discarded. This means that searching for a rare character is quite slow. However, all I needed was to find the last linebreak in a file containing lines which are relatively short compared to the chunk size, so each S.elemIndexEnd doesn't take very long.