mirror of
				https://github.com/eledio-devices/thirdparty-miniz.git
				synced 2025-10-31 00:32:38 +01:00 
			
		
		
		
	Implement inflateReset() function
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
This commit is contained in:
		
							
								
								
									
										26
									
								
								miniz.c
									
									
									
									
									
								
							
							
						
						
									
										26
									
								
								miniz.c
									
									
									
									
									
								
							| @@ -397,6 +397,32 @@ int mz_inflateInit(mz_streamp pStream) | ||||
|     return mz_inflateInit2(pStream, MZ_DEFAULT_WINDOW_BITS); | ||||
| } | ||||
|  | ||||
| int mz_inflateReset(mz_streamp pStream) | ||||
| { | ||||
|     inflate_state *pDecomp; | ||||
|     if (!pStream) | ||||
|         return MZ_STREAM_ERROR; | ||||
|  | ||||
|     pStream->data_type = 0; | ||||
|     pStream->adler = 0; | ||||
|     pStream->msg = NULL; | ||||
|     pStream->total_in = 0; | ||||
|     pStream->total_out = 0; | ||||
|     pStream->reserved = 0; | ||||
|  | ||||
|     pDecomp = (inflate_state *)pStream->state; | ||||
|  | ||||
|     tinfl_init(&pDecomp->m_decomp); | ||||
|     pDecomp->m_dict_ofs = 0; | ||||
|     pDecomp->m_dict_avail = 0; | ||||
|     pDecomp->m_last_status = TINFL_STATUS_NEEDS_MORE_INPUT; | ||||
|     pDecomp->m_first_call = 1; | ||||
|     pDecomp->m_has_flushed = 0; | ||||
|     /* pDecomp->m_window_bits = window_bits */; | ||||
|  | ||||
|     return MZ_OK; | ||||
| } | ||||
|  | ||||
| int mz_inflate(mz_streamp pStream, int flush) | ||||
| { | ||||
|     inflate_state *pState; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user