Struct lopdf_bugfix_19072017::Stream
[−]
[src]
pub struct Stream { pub dict: Dictionary, pub content: Vec<u8>, pub allows_compression: bool, }
Stream object Warning - all streams must be indirect objects, while the stream dictionary may be a direct object
Fields
dict: Dictionary
Associated stream dictionary
content: Vec<u8>
Contents of the stream in bytes
allows_compression: bool
Can the stream be compressed by the Document::compress()
function?
Font streams may not be compressed, for example
Methods
impl Stream
[src]
fn new(dict: Dictionary, content: Vec<u8>) -> Stream
fn with_compression(self, allows_compression: bool) -> Stream
Default is that the stream may be compressed. On font streams, set this to false, otherwise the font will be corrupt
fn filter(&self) -> Option<String>
fn set_content(&mut self, content: Vec<u8>)
fn compress(&mut self)
fn decompressed_content(&self) -> Option<Vec<u8>>
fn decompress(&mut self)
impl Stream
[src]
fn decode_content(&self) -> Result<Content>
Decode content after decoding all stream filters.
Trait Implementations
impl Debug for Stream
[src]
impl Clone for Stream
[src]
fn clone(&self) -> Stream
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more