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

\item{data}{Data to write (raw, numeric, integer, or logical vector)}

\item{offset}{Byte offset to start writing (0-based)}
}
\value{
Number of bytes written, invisibly.
}
\description{
Write data to a segment
}
\examples{
\donttest{
seg <- segment_create(1024)
segment_write(seg, as.integer(1:10), offset = 0)
segment_close(seg)
}
}
