Should check this for performance. If it isn't any good we could move it to `Connection`'s prototype or pass in encoding (and possibly others) as arguments