Skip to content

Commit 951ce6b

Browse files
committed
review
1 parent 7098f77 commit 951ce6b

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

crates/store/re_data_source/src/load_stdin.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ pub fn load_stdin(tx: Sender<LogMsg>) -> anyhow::Result<()> {
99
let version_policy = re_log_encoding::decoder::VersionPolicy::Warn;
1010

1111
let stdin = std::io::BufReader::new(std::io::stdin());
12-
let decoder = re_log_encoding::decoder::Decoder::new_multiplexed(version_policy, stdin)?;
12+
let decoder = re_log_encoding::decoder::Decoder::new_concatenated(version_policy, stdin)?;
1313

1414
rayon::spawn(move || {
1515
re_tracing::profile_scope!("stdin");

crates/store/re_log_encoding/src/decoder/mod.rs

+12-10
Original file line numberDiff line numberDiff line change
@@ -161,13 +161,14 @@ pub struct Decoder<R: std::io::Read> {
161161
impl<R: std::io::Read> Decoder<R> {
162162
/// Instantiates a new decoder.
163163
///
164-
/// This does not support multiplexed streams.
164+
/// This does not support concatenated streams (i.e. streams of bytes where multiple RRD files
165+
/// -- not recordings, RRD files! -- follow each other).
165166
///
166-
/// If you're not familiar with multiplexed RRD streams, then this is probably the function
167+
/// If you're not familiar with concatenated RRD streams, then this is probably the function
167168
/// that you want to be using.
168169
///
169170
/// See also:
170-
/// * [`Decoder::new_multiplexed`]
171+
/// * [`Decoder::new_concatenated`]
171172
pub fn new(version_policy: VersionPolicy, mut read: R) -> Result<Self, DecodeError> {
172173
re_tracing::profile_function!();
173174

@@ -186,22 +187,23 @@ impl<R: std::io::Read> Decoder<R> {
186187
})
187188
}
188189

189-
/// Instantiates a new multiplexed decoder.
190+
/// Instantiates a new concatenated decoder.
190191
///
191-
/// This will gracefully handle multiplexed RRD streams, at the cost of extra performance
192-
/// overhead, by looking ahead for potential `FileHeader`s in the stream.
192+
/// This will gracefully handle concatenated RRD streams (i.e. streams of bytes where multiple
193+
/// RRD files -- not recordings, RRD files! -- follow each other), at the cost of extra
194+
/// performance overhead, by looking ahead for potential `FileHeader`s in the stream.
193195
///
194-
/// The [`CrateVersion`] of the final, demultiplexed stream will correspond to the most recent
196+
/// The [`CrateVersion`] of the final, deconcatenated stream will correspond to the most recent
195197
/// version among all the versions found in the stream.
196198
///
197199
/// This is particularly useful when working with stdio streams.
198200
///
199-
/// If you're not familiar with multiplexed RRD streams, then you probably want to use
201+
/// If you're not familiar with concatenated RRD streams, then you probably want to use
200202
/// [`Decoder::new`] instead.
201203
///
202204
/// See also:
203205
/// * [`Decoder::new`]
204-
pub fn new_multiplexed(
206+
pub fn new_concatenated(
205207
version_policy: VersionPolicy,
206208
mut read: std::io::BufReader<R>,
207209
) -> Result<Self, DecodeError> {
@@ -232,7 +234,7 @@ impl<R: std::io::Read> Decoder<R> {
232234
///
233235
/// Returns true if a valid header was found.
234236
///
235-
/// No-op if the decoder wasn't initialized with [`Decoder::new_multiplexed`].
237+
/// No-op if the decoder wasn't initialized with [`Decoder::new_concatenated`].
236238
fn peek_file_header(&mut self) -> bool {
237239
match &mut self.read {
238240
Reader::Raw(_) => false,

0 commit comments

Comments
 (0)