Skip to content

Commit

Permalink
chore: fix some comments (#287)
Browse files Browse the repository at this point in the history
Signed-off-by: renshuncui <[email protected]>
  • Loading branch information
renshuncui authored Jun 21, 2024
1 parent 8e7aa79 commit cc5039d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion examples/zstdcat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ fn main() {
// takes a single (repeatable and optional) argument.
let args = Args::parse();

// If nothign was given, act as if `-` was there.
// If nothing was given, act as if `-` was there.
if args.file.is_empty() {
decompress_file("-").unwrap();
} else {
Expand Down
4 changes: 2 additions & 2 deletions src/dict.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//!
//! A dictionary can help improve the compression of small files.
//! The dictionary must be present during decompression,
//! but can be shared accross multiple "similar" files.
//! but can be shared across multiple "similar" files.
//!
//! Creating a dictionary using the `zstd` C library,
//! using the `zstd` command-line interface, using this library,
Expand Down Expand Up @@ -129,7 +129,7 @@ pub fn from_continuous(

/// Train a dictionary from multiple samples.
///
/// The samples will internaly be copied to a single continuous buffer,
/// The samples will internally be copied to a single continuous buffer,
/// so make sure you have enough memory available.
///
/// If you need to stretch your system's limits,
Expand Down
2 changes: 1 addition & 1 deletion src/stream/write/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ impl<'a, W: Write> Encoder<'a, W> {
}
}

/// Attemps to finish the stream.
/// Attempts to finish the stream.
///
/// You *need* to finish the stream when you're done writing, either with
/// this method or with [`finish(self)`](#method.finish).
Expand Down
4 changes: 2 additions & 2 deletions zstd-safe/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ pub fn max_c_level() -> CompressionLevel {
/// This will try to compress `src` entirely and write the result to `dst`, returning the number of
/// bytes written. If `dst` is too small to hold the compressed content, an error will be returned.
///
/// For streaming operations that don't require to store the entire input/ouput in memory, see
/// For streaming operations that don't require to store the entire input/output in memory, see
/// `compress_stream`.
pub fn compress<C: WriteBuf + ?Sized>(
dst: &mut C,
Expand Down Expand Up @@ -2005,7 +2005,7 @@ pub fn get_dict_id_from_dict(dict: &[u8]) -> Option<NonZeroU32> {
///
/// Returns `None` if the dictionary ID could not be decoded. This may happen if:
/// * The frame was not encoded with a dictionary.
/// * The frame intentionally did not include dicionary ID.
/// * The frame intentionally did not include dictionary ID.
/// * The dictionary was non-conformant.
/// * `src` is too small and does not include the frame header.
/// * `src` is not a valid zstd frame prefix.
Expand Down

0 comments on commit cc5039d

Please sign in to comment.