buffer: add slice methods