% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/segment.R
\name{segment_read}
\alias{segment_read}
\title{Read raw data from a segment}
\usage{
segment_read(x, offset = 0, size = NULL)
}
\arguments{
\item{x}{A shard_segment object}

\item{offset}{Byte offset to start reading (0-based)}

\item{size}{Number of bytes to read}
}
\value{
A raw vector containing the bytes read from the segment.
}
\description{
Read raw data from a segment
}
\examples{
\donttest{
seg <- segment_create(1024)
segment_write(seg, as.integer(1:4), offset = 0)
segment_read(seg, offset = 0, size = 16)
segment_close(seg)
}
}
