src/minilzo.cpp
changeset 9390 88d36f907e96
parent 9156 b9618a02f28b
child 9543 a60fb4bacc66
equal deleted inserted replaced
9389:b547cd1aaac2 9390:88d36f907e96
  1181 		ii = ip;
  1181 		ii = ip;
  1182 		if (ip >= ip_end)
  1182 		if (ip >= ip_end)
  1183 			break;
  1183 			break;
  1184 	}
  1184 	}
  1185 
  1185 
  1186 	*out_len = op - out;
  1186 	*out_len = (lzo_uint)(op - out);
  1187 	return pd(in_end,ii);
  1187 	return pd(in_end,ii);
  1188 }
  1188 }
  1189 
  1189 
  1190 LZO_PUBLIC(int)
  1190 LZO_PUBLIC(int)
  1191 DO_COMPRESS	  ( const lzo_byte *in , lzo_uint  in_len,
  1191 DO_COMPRESS	  ( const lzo_byte *in , lzo_uint  in_len,
  1231 
  1231 
  1232 	*op++ = M4_MARKER | 1;
  1232 	*op++ = M4_MARKER | 1;
  1233 	*op++ = 0;
  1233 	*op++ = 0;
  1234 	*op++ = 0;
  1234 	*op++ = 0;
  1235 
  1235 
  1236 	*out_len = op - out;
  1236 	*out_len = (lzo_uint)(op - out);
  1237 	return LZO_E_OK;
  1237 	return LZO_E_OK;
  1238 }
  1238 }
  1239 
  1239 
  1240 #undef do_compress
  1240 #undef do_compress
  1241 #undef DO_COMPRESS
  1241 #undef DO_COMPRESS
  1553 	return LZO_E_EOF_NOT_FOUND;
  1553 	return LZO_E_EOF_NOT_FOUND;
  1554 #endif
  1554 #endif
  1555 
  1555 
  1556 eof_found:
  1556 eof_found:
  1557 	assert(t == 1);
  1557 	assert(t == 1);
  1558 	*out_len = op - out;
  1558 	*out_len = (lzo_uint)(op - out);
  1559 	return (ip == ip_end ? LZO_E_OK :
  1559 	return (ip == ip_end ? LZO_E_OK :
  1560 		   (ip < ip_end  ? LZO_E_INPUT_NOT_CONSUMED : LZO_E_INPUT_OVERRUN));
  1560 		   (ip < ip_end  ? LZO_E_INPUT_NOT_CONSUMED : LZO_E_INPUT_OVERRUN));
  1561 
  1561 
  1562 #if defined(HAVE_NEED_IP)
  1562 #if defined(HAVE_NEED_IP)
  1563 input_overrun:
  1563 input_overrun: