return &sstream->istream.istream;
}
+struct istream *i_stream_create_sized_range(struct istream *input,
+ uoff_t offset, uoff_t size)
+{
+ uoff_t orig_offset = input->v_offset;
+ struct istream *ret;
+
+ input->v_offset = offset;
+ ret = i_stream_create_sized(input, size);
+ input->v_offset = orig_offset;
+ return ret;
+}
+
#undef i_stream_create_sized_with_callback
struct istream *
i_stream_create_sized_with_callback(struct istream *input, uoff_t size,
/* Assume that input is exactly the given size. If it's smaller, log an error
and fail with EINVAL error. If it's larger, log an error but don't fail. */
struct istream *i_stream_create_sized(struct istream *input, uoff_t size);
+struct istream *i_stream_create_sized_range(struct istream *input,
+ uoff_t offset, uoff_t size);
/* Same as i_stream_create_sized(), but set the error message via the
callback. */
struct istream *