@@ -4495,6 +4495,10 @@ unsafe fn ZSTD_copyCCtx_internal(
44954495 ) ;
44964496 0
44974497}
4498+
4499+ #[ deprecated(
4500+ note = "This function will likely be removed in a future release. It is misleading and has very limited utility."
4501+ ) ]
44984502#[ cfg_attr( feature = "export-symbols" , export_name = crate :: prefix!( ZSTD_copyCCtx ) ) ]
44994503pub unsafe extern "C" fn ZSTD_copyCCtx (
45004504 dstCCtx : * mut ZSTD_CCtx ,
@@ -5509,6 +5513,11 @@ pub unsafe extern "C" fn ZSTD_sequenceBound(srcSize: size_t) -> size_t {
55095513 let maxNbDelims = ( srcSize / ZSTD_BLOCKSIZE_MAX_MIN as size_t ) . wrapping_add ( 1 ) ;
55105514 maxNbSeq. wrapping_add ( maxNbDelims)
55115515}
5516+
5517+ #[ deprecated(
5518+ since = "1.5.6" ,
5519+ note = "For debugging only, will be replaced by [`ZSTD_extractSequences`]"
5520+ ) ]
55125521#[ cfg_attr( feature = "export-symbols" , export_name = crate :: prefix!( ZSTD_generateSequences ) ) ]
55135522pub unsafe extern "C" fn ZSTD_generateSequences (
55145523 zc : * mut ZSTD_CCtx ,
@@ -7131,6 +7140,7 @@ unsafe extern "C" fn ZSTD_compressContinue_internal(
71317140 }
71327141 cSize. wrapping_add ( fhSize)
71337142}
7143+
71347144#[ cfg_attr( feature = "export-symbols" , export_name = crate :: prefix!( ZSTD_compressContinue_public ) ) ]
71357145pub unsafe extern "C" fn ZSTD_compressContinue_public (
71367146 cctx : * mut ZSTD_CCtx ,
@@ -7141,6 +7151,11 @@ pub unsafe extern "C" fn ZSTD_compressContinue_public(
71417151) -> size_t {
71427152 ZSTD_compressContinue_internal ( cctx, dst, dstCapacity, src, srcSize, 1 , 0 )
71437153}
7154+
7155+ #[ deprecated(
7156+ since = "1.5.5" ,
7157+ note = "The buffer-less API is deprecated in favor of the normal streaming API. See docs."
7158+ ) ]
71447159#[ cfg_attr( feature = "export-symbols" , export_name = crate :: prefix!( ZSTD_compressContinue ) ) ]
71457160pub unsafe extern "C" fn ZSTD_compressContinue (
71467161 cctx : * mut ZSTD_CCtx ,
@@ -7151,6 +7166,8 @@ pub unsafe extern "C" fn ZSTD_compressContinue(
71517166) -> size_t {
71527167 ZSTD_compressContinue_public ( cctx, dst, dstCapacity, src, srcSize)
71537168}
7169+
7170+ #[ deprecated]
71547171unsafe fn ZSTD_getBlockSize_deprecated ( cctx : * const ZSTD_CCtx ) -> size_t {
71557172 let cParams = ( * cctx) . appliedParams . cParams ;
71567173 if ( * cctx) . appliedParams . maxBlockSize < ( 1 ) << cParams. windowLog {
@@ -7159,10 +7176,17 @@ unsafe fn ZSTD_getBlockSize_deprecated(cctx: *const ZSTD_CCtx) -> size_t {
71597176 ( 1 ) << cParams. windowLog
71607177 }
71617178}
7179+
7180+ #[ deprecated(
7181+ note = "The block API is deprecated in favor of the normal compression API. See docs."
7182+ ) ]
71627183#[ cfg_attr( feature = "export-symbols" , export_name = crate :: prefix!( ZSTD_getBlockSize ) ) ]
71637184pub unsafe extern "C" fn ZSTD_getBlockSize ( cctx : * const ZSTD_CCtx ) -> size_t {
7185+ #[ allow( deprecated) ]
71647186 ZSTD_getBlockSize_deprecated ( cctx)
71657187}
7188+
7189+ #[ deprecated( note = "Deprecated definitions that are still used internally." ) ]
71667190#[ cfg_attr( feature = "export-symbols" , export_name = crate :: prefix!( ZSTD_compressBlock_deprecated ) ) ]
71677191pub unsafe extern "C" fn ZSTD_compressBlock_deprecated (
71687192 cctx : * mut ZSTD_CCtx ,
@@ -7171,12 +7195,17 @@ pub unsafe extern "C" fn ZSTD_compressBlock_deprecated(
71717195 src : * const core:: ffi:: c_void ,
71727196 srcSize : size_t ,
71737197) -> size_t {
7198+ #[ allow( deprecated) ]
71747199 let blockSizeMax = ZSTD_getBlockSize_deprecated ( cctx) ;
71757200 if srcSize > blockSizeMax {
71767201 return Error :: srcSize_wrong. to_error_code ( ) ;
71777202 }
71787203 ZSTD_compressContinue_internal ( cctx, dst, dstCapacity, src, srcSize, 0 , 0 )
71797204}
7205+
7206+ #[ deprecated(
7207+ note = "The block API is deprecated in favor of the normal compression API. See docs."
7208+ ) ]
71807209#[ cfg_attr( feature = "export-symbols" , export_name = crate :: prefix!( ZSTD_compressBlock ) ) ]
71817210pub unsafe extern "C" fn ZSTD_compressBlock (
71827211 cctx : * mut ZSTD_CCtx ,
@@ -7185,8 +7214,10 @@ pub unsafe extern "C" fn ZSTD_compressBlock(
71857214 src : * const core:: ffi:: c_void ,
71867215 srcSize : size_t ,
71877216) -> size_t {
7217+ #[ allow( deprecated) ]
71887218 ZSTD_compressBlock_deprecated ( cctx, dst, dstCapacity, src, srcSize)
71897219}
7220+
71907221unsafe fn ZSTD_loadDictionaryContent (
71917222 ms : & mut ZSTD_MatchState_t ,
71927223 ls : * mut ldmState_t ,
@@ -7670,6 +7701,8 @@ pub unsafe fn ZSTD_compressBegin_advanced_internal(
76707701 ZSTDb_not_buffered ,
76717702 )
76727703}
7704+
7705+ #[ deprecated( since = "1.5.0" , note = "use advanced API to access custom parameters" ) ]
76737706#[ cfg_attr( feature = "export-symbols" , export_name = crate :: prefix!( ZSTD_compressBegin_advanced ) ) ]
76747707pub unsafe extern "C" fn ZSTD_compressBegin_advanced (
76757708 cctx : * mut ZSTD_CCtx ,
@@ -7825,6 +7858,11 @@ unsafe fn ZSTD_compressBegin_usingDict_deprecated(
78257858 ZSTDb_not_buffered ,
78267859 )
78277860}
7861+
7862+ #[ deprecated(
7863+ since = "1.5.5" ,
7864+ note = "The buffer-less API is deprecated in favor of the normal streaming API. See docs."
7865+ ) ]
78287866#[ cfg_attr( feature = "export-symbols" , export_name = crate :: prefix!( ZSTD_compressBegin_usingDict ) ) ]
78297867pub unsafe extern "C" fn ZSTD_compressBegin_usingDict (
78307868 cctx : * mut ZSTD_CCtx ,
@@ -7834,6 +7872,11 @@ pub unsafe extern "C" fn ZSTD_compressBegin_usingDict(
78347872) -> size_t {
78357873 ZSTD_compressBegin_usingDict_deprecated ( cctx, dict, dictSize, compressionLevel)
78367874}
7875+
7876+ #[ deprecated(
7877+ since = "1.5.5" ,
7878+ note = "The buffer-less API is deprecated in favor of the normal streaming API. See docs."
7879+ ) ]
78377880#[ cfg_attr( feature = "export-symbols" , export_name = crate :: prefix!( ZSTD_compressBegin ) ) ]
78387881pub unsafe extern "C" fn ZSTD_compressBegin (
78397882 cctx : * mut ZSTD_CCtx ,
@@ -7935,6 +7978,11 @@ pub unsafe extern "C" fn ZSTD_compressEnd_public(
79357978 ZSTD_CCtx_trace ( cctx, endResult) ;
79367979 cSize. wrapping_add ( endResult)
79377980}
7981+
7982+ #[ deprecated(
7983+ since = "1.5.5" ,
7984+ note = "The buffer-less API is deprecated in favor of the normal streaming API. See docs."
7985+ ) ]
79387986#[ cfg_attr( feature = "export-symbols" , export_name = crate :: prefix!( ZSTD_compressEnd ) ) ]
79397987pub unsafe extern "C" fn ZSTD_compressEnd (
79407988 cctx : * mut ZSTD_CCtx ,
@@ -7945,6 +7993,11 @@ pub unsafe extern "C" fn ZSTD_compressEnd(
79457993) -> size_t {
79467994 ZSTD_compressEnd_public ( cctx, dst, dstCapacity, src, srcSize)
79477995}
7996+
7997+ #[ deprecated(
7998+ since = "1.5.0" ,
7999+ note = "It can be replaced by [`ZSTD_compress2`], in combination with [`ZSTD_CCtx_setParameter`] and other parameter setters."
8000+ ) ]
79488001#[ cfg_attr( feature = "export-symbols" , export_name = crate :: prefix!( ZSTD_compress_advanced ) ) ]
79498002pub unsafe extern "C" fn ZSTD_compress_advanced (
79508003 cctx : * mut ZSTD_CCtx ,
@@ -9128,6 +9181,11 @@ unsafe fn ZSTD_compressBegin_usingCDict_internal(
91289181 ZSTDb_not_buffered ,
91299182 )
91309183}
9184+
9185+ #[ deprecated(
9186+ since = "1.5.0" ,
9187+ note = "use advanced API to access custom parameters."
9188+ ) ]
91319189#[ cfg_attr( feature = "export-symbols" , export_name = crate :: prefix!( ZSTD_compressBegin_usingCDict_advanced ) ) ]
91329190pub unsafe extern "C" fn ZSTD_compressBegin_usingCDict_advanced (
91339191 cctx : * mut ZSTD_CCtx ,
@@ -9137,6 +9195,8 @@ pub unsafe extern "C" fn ZSTD_compressBegin_usingCDict_advanced(
91379195) -> size_t {
91389196 ZSTD_compressBegin_usingCDict_internal ( cctx, cdict, fParams, pledgedSrcSize)
91399197}
9198+
9199+ #[ deprecated( note = "Deprecated definitions that are still used internally." ) ]
91409200#[ cfg_attr( feature = "export-symbols" , export_name = crate :: prefix!( ZSTD_compressBegin_usingCDict_deprecated ) ) ]
91419201pub unsafe extern "C" fn ZSTD_compressBegin_usingCDict_deprecated (
91429202 cctx : * mut ZSTD_CCtx ,
@@ -9151,13 +9211,20 @@ pub unsafe extern "C" fn ZSTD_compressBegin_usingCDict_deprecated(
91519211 } ;
91529212 ZSTD_compressBegin_usingCDict_internal ( cctx, cdict, fParams, ZSTD_CONTENTSIZE_UNKNOWN )
91539213}
9214+
9215+ #[ deprecated(
9216+ since = "1.5.5" ,
9217+ note = "The buffer-less API is deprecated in favor of the normal streaming API. See docs."
9218+ ) ]
91549219#[ cfg_attr( feature = "export-symbols" , export_name = crate :: prefix!( ZSTD_compressBegin_usingCDict ) ) ]
91559220pub unsafe extern "C" fn ZSTD_compressBegin_usingCDict (
91569221 cctx : * mut ZSTD_CCtx ,
91579222 cdict : * const ZSTD_CDict ,
91589223) -> size_t {
9224+ #[ allow( deprecated) ]
91599225 ZSTD_compressBegin_usingCDict_deprecated ( cctx, cdict)
91609226}
9227+
91619228unsafe fn ZSTD_compress_usingCDict_internal (
91629229 cctx : * mut ZSTD_CCtx ,
91639230 dst : * mut core:: ffi:: c_void ,
@@ -9178,6 +9245,11 @@ unsafe fn ZSTD_compress_usingCDict_internal(
91789245 }
91799246 ZSTD_compressEnd_public ( cctx, dst, dstCapacity, src, srcSize)
91809247}
9248+
9249+ #[ deprecated(
9250+ since = "1.5.0" ,
9251+ note = "It can be replaced by [` ZSTD_compress2`], in combination with [`ZSTD_CCtx_loadDictionary`] and other parameter setters."
9252+ ) ]
91819253#[ cfg_attr( feature = "export-symbols" , export_name = crate :: prefix!( ZSTD_compress_usingCDict_advanced ) ) ]
91829254pub unsafe extern "C" fn ZSTD_compress_usingCDict_advanced (
91839255 cctx : * mut ZSTD_CCtx ,
@@ -9250,6 +9322,11 @@ unsafe fn ZSTD_getCParamMode(
92509322 ZSTD_cpm_noAttachDict
92519323 }
92529324}
9325+
9326+ #[ deprecated(
9327+ since = "1.5.0" ,
9328+ note = "use [`ZSTD_CCtx_reset`], see zstd.h for detailed instructions"
9329+ ) ]
92539330#[ cfg_attr( feature = "export-symbols" , export_name = crate :: prefix!( ZSTD_resetCStream ) ) ]
92549331pub unsafe extern "C" fn ZSTD_resetCStream (
92559332 zcs : * mut ZSTD_CStream ,
@@ -9300,6 +9377,11 @@ pub unsafe fn ZSTD_initCStream_internal(
93009377 }
93019378 0
93029379}
9380+
9381+ #[ deprecated(
9382+ since = "1.5.0" ,
9383+ note = "use [`ZSTD_CCtx_reset`] and [`ZSTD_CCtx_refCDict`], see zstd.h for detailed instructions"
9384+ ) ]
93039385#[ cfg_attr( feature = "export-symbols" , export_name = crate :: prefix!( ZSTD_initCStream_usingCDict_advanced ) ) ]
93049386pub unsafe extern "C" fn ZSTD_initCStream_usingCDict_advanced (
93059387 zcs : * mut ZSTD_CStream ,
@@ -9322,6 +9404,10 @@ pub unsafe extern "C" fn ZSTD_initCStream_usingCDict_advanced(
93229404 }
93239405 0
93249406}
9407+
9408+ #[ deprecated(
9409+ note = "use ZSTD_CCtx_reset and ZSTD_CCtx_refCDict, see zstd.h for detailed instructions"
9410+ ) ]
93259411#[ cfg_attr( feature = "export-symbols" , export_name = crate :: prefix!( ZSTD_initCStream_usingCDict ) ) ]
93269412pub unsafe extern "C" fn ZSTD_initCStream_usingCDict (
93279413 zcs : * mut ZSTD_CStream ,
@@ -9337,6 +9423,11 @@ pub unsafe extern "C" fn ZSTD_initCStream_usingCDict(
93379423 }
93389424 0
93399425}
9426+
9427+ #[ deprecated(
9428+ since = "1.5.0" ,
9429+ note = "use [`ZSTD_CCtx_reset`], see zstd.h for detailed instructions"
9430+ ) ]
93409431#[ cfg_attr( feature = "export-symbols" , export_name = crate :: prefix!( ZSTD_initCStream_advanced ) ) ]
93419432pub unsafe extern "C" fn ZSTD_initCStream_advanced (
93429433 zcs : * mut ZSTD_CStream ,
@@ -9369,6 +9460,11 @@ pub unsafe extern "C" fn ZSTD_initCStream_advanced(
93699460 }
93709461 0
93719462}
9463+
9464+ #[ deprecated(
9465+ since = "1.5.0" ,
9466+ note = "use ZSTD_CCtx_reset, see zstd.h for detailed instructions"
9467+ ) ]
93729468#[ cfg_attr( feature = "export-symbols" , export_name = crate :: prefix!( ZSTD_initCStream_usingDict ) ) ]
93739469pub unsafe extern "C" fn ZSTD_initCStream_usingDict (
93749470 zcs : * mut ZSTD_CStream ,
@@ -9394,6 +9490,11 @@ pub unsafe extern "C" fn ZSTD_initCStream_usingDict(
93949490 }
93959491 0
93969492}
9493+
9494+ #[ deprecated(
9495+ since = "1.5.0" ,
9496+ note = "use [`ZSTD_CCtx_reset`], see zstd.h for detailed instructions"
9497+ ) ]
93979498#[ cfg_attr( feature = "export-symbols" , export_name = crate :: prefix!( ZSTD_initCStream_srcSize ) ) ]
93989499pub unsafe extern "C" fn ZSTD_initCStream_srcSize (
93999500 zcs : * mut ZSTD_CStream ,
0 commit comments