pdf-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pdf-devel] resize the buffer


From: jemarch
Subject: Re: [pdf-devel] resize the buffer
Date: Mon, 15 Dec 2008 22:44:43 +0100
User-agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (Shijō) APEL/10.6 Emacs/23.0.60 (i686-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)

   > I need a method of resize the buffer when caching data, so I think there 
should be such a method of pdf_stm_buffer_t.      
   >                                                                            
                                                
   > Thanks!                                                                    
                                                
   > Yang                                                                       
                                                

   It would be useful for me too. Both AESv2 and MD filters profit from
   this, since they must cache all input too.

What about:
      
pdf_status_t pdf_stm_buffer_resize (pdf_stm_buffer_t BUFFER, pdf_size_t 
NEW_SIZE);

Resize a given buffer. 

If NEW_SIZE is larger than the actual size of @var{buffer} then BUFFER->size
will be increased, while both BUFFER->rp and BUFFER->wp will remain
unchanged. 

If NEW_SIZE is shorter than the actual size of BUFFER then the memory
pointed by BUFFER->data will be truncated, BUFFER->size will be
adjusted to the new value and both BUFFER->rp and BUFFER->wp will be
set to BUFFER->size if they are exceeding the new size of the buffer.

Would it fit your needs?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]