Skip to content

Add fn skip(n: uint) with a default implementation to Reader #13989

Description

@carllerche

Reader should have an extra fn that allows skipping a number of bytes. The default implementation could look something like:

fn skip(n: uint) { let _ = self.read(Vec::from_elem(n, 0u8); }

However, BufReader could implement the fn by simply updating the internal cursor. This would allow more efficient skipping w/o having to require Seek.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P-mediumMedium priorityT-libs-api[DEPRECATED; DO NOT USE]

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions