base: Limit buffer size for BufferedStream objects.