Simon Willison’s Weblog

Subscribe

15th February 2021

TIL Using io.BufferedReader to peek against a non-peekable stream — When building the [--sniff option](https://github.com/simonw/sqlite-utils/issues/230) for `sqlite-utils insert` (which attempts to detect the correct CSV delimiter and quote character by looking at the first 2048 bytes of a CSV file) I had the need to peek ahead in an incoming stream of data.

Recent articles

This is a beat by Simon Willison, posted on 15th February 2021.

Monthly briefing

Sponsor me for $10/month and get a curated email digest of the month's most important LLM developments.

Pay me to send you less!

Sponsor & subscribe