byte_count/2
byte_count(
+Stream,
-Count)
Obtains the total number of bytes either input from or output to the open binary stream Stream and unifies it with Count.
A valid open binary stream.
The resulting byte count of the stream.
A freshly opened stream has a byte count of 0. When a byte is input from or output to a Prolog stream, the byte count of the Prolog stream is increased by one.
The count is reset by set_stream_position/2
.
Stream errors (see ref-iou-sfh-est).
byte_count/2
, line_count/2
, line_position/2
,
stream_position/2
,
set_stream_position/2
,
ref-iou-sfh.