1
mirror of https://github.com/flipperdevices/flipperzero-firmware.git synced 2025-12-12 04:41:26 +04:00

Updater: resource compression (#3716)

* toolbox: compress: moved decompressor implementation to separate func
* toolbox: compress: callback-based api; cli: storage unpack command
* toolbox: compress: separate r/w contexts for stream api
* targets: f18: sync API
* compress: naming fixes & cleanup
* toolbox: compress: using hs buffer size for stream buffers
* toolbox: tar: heatshrink stream mode
* toolbox: compress: docs & small cleanup
* toolbox: tar: header support for .hs; updater: now uses .hs for resources; .hs.tar: now rewindable
* toolbox: compress: fixed hs stream tail handling
* updater: reworked progress for resources cleanup; rebalanced stage weights
* updater: single-pass decompression; scripts: print resources compression ratio
* updater: fixed warnings
* toolbox: tar: doxygen
* docs: update
* docs: info or tarhs format; scripts: added standalone compression/decompression tool for heatshrink-formatted streams
* scripts: tarhs: fixed parameter handling
* cli: storage extract command; toolbox: tar: guess type based on extension
* unit_tests: added test for streamed raw hs decompressor `compress_decode_streamed`
* unit_tests: compress: added extraction test for .tar.hs
* rpc: autodetect compressed archives
* scripts: minor cleanup of common parts
* scripts: update: now using in-memory intermediate tar stream
* scripts: added hs.py wrapper for heatshrink-related ops (single object and directory-as-tar compression)
* scripts: naming fixes
* Toolbox: export compress_config_heatshrink_default as const symbol
* Toolbox: fix various types naming
* Toolbox: more of types naming fixes
* Toolbox: use size_t in compress io callbacks and structures
* UnitTests: update to match new compress API
* Toolbox: proper path_extract_extension usage

Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
hedger
2024-06-30 13:38:48 +03:00
committed by GitHub
parent a881816673
commit fcbcb6b5a8
25 changed files with 1339 additions and 165 deletions

View File

@@ -1,5 +1,5 @@
entry,status,name,type,params
Version,+,66.2,,
Version,+,67.0,,
Header,+,applications/services/bt/bt_service/bt.h,,
Header,+,applications/services/bt/bt_service/bt_keys_storage.h,,
Header,+,applications/services/cli/cli.h,,
@@ -780,13 +780,20 @@ Function,+,composite_api_resolver_add,void,"CompositeApiResolver*, const ElfApiI
Function,+,composite_api_resolver_alloc,CompositeApiResolver*,
Function,+,composite_api_resolver_free,void,CompositeApiResolver*
Function,+,composite_api_resolver_get,const ElfApiInterface*,CompositeApiResolver*
Function,+,compress_alloc,Compress*,uint16_t
Function,+,compress_alloc,Compress*,"CompressType, const void*"
Function,+,compress_decode,_Bool,"Compress*, uint8_t*, size_t, uint8_t*, size_t, size_t*"
Function,+,compress_decode_streamed,_Bool,"Compress*, CompressIoCallback, void*, CompressIoCallback, void*"
Function,+,compress_encode,_Bool,"Compress*, uint8_t*, size_t, uint8_t*, size_t, size_t*"
Function,+,compress_free,void,Compress*
Function,+,compress_icon_alloc,CompressIcon*,size_t
Function,+,compress_icon_decode,void,"CompressIcon*, const uint8_t*, uint8_t**"
Function,+,compress_icon_free,void,CompressIcon*
Function,+,compress_stream_decoder_alloc,CompressStreamDecoder*,"CompressType, const void*, CompressIoCallback, void*"
Function,+,compress_stream_decoder_free,void,CompressStreamDecoder*
Function,+,compress_stream_decoder_read,_Bool,"CompressStreamDecoder*, uint8_t*, size_t"
Function,+,compress_stream_decoder_rewind,_Bool,CompressStreamDecoder*
Function,+,compress_stream_decoder_seek,_Bool,"CompressStreamDecoder*, size_t"
Function,+,compress_stream_decoder_tell,size_t,CompressStreamDecoder*
Function,-,copysign,double,"double, double"
Function,-,copysignf,float,"float, float"
Function,-,copysignl,long double,"long double, long double"
@@ -2617,6 +2624,8 @@ Function,+,tar_archive_file_finalize,_Bool,TarArchive*
Function,+,tar_archive_finalize,_Bool,TarArchive*
Function,+,tar_archive_free,void,TarArchive*
Function,+,tar_archive_get_entries_count,int32_t,TarArchive*
Function,+,tar_archive_get_mode_for_path,TarOpenMode,const char*
Function,+,tar_archive_get_read_progress,_Bool,"TarArchive*, int32_t*, int32_t*"
Function,+,tar_archive_open,_Bool,"TarArchive*, const char*, TarOpenMode"
Function,+,tar_archive_set_file_callback,void,"TarArchive*, tar_unpack_file_cb, void*"
Function,+,tar_archive_store_data,_Bool,"TarArchive*, const char*, const uint8_t*, const int32_t"
@@ -2816,6 +2825,7 @@ Variable,-,_sys_nerr,int,
Variable,-,ble_profile_hid,const FuriHalBleProfileTemplate*,
Variable,-,ble_profile_serial,const FuriHalBleProfileTemplate*,
Variable,+,cli_vcp,CliSession,
Variable,+,compress_config_heatshrink_default,const CompressConfigHeatshrink,
Variable,+,firmware_api_interface,const ElfApiInterface*,
Variable,+,furi_hal_i2c_bus_external,FuriHalI2cBus,
Variable,+,furi_hal_i2c_bus_power,FuriHalI2cBus,
1 entry status name type params
2 Version + 66.2 67.0
3 Header + applications/services/bt/bt_service/bt.h
4 Header + applications/services/bt/bt_service/bt_keys_storage.h
5 Header + applications/services/cli/cli.h
780 Function + composite_api_resolver_alloc CompositeApiResolver*
781 Function + composite_api_resolver_free void CompositeApiResolver*
782 Function + composite_api_resolver_get const ElfApiInterface* CompositeApiResolver*
783 Function + compress_alloc Compress* uint16_t CompressType, const void*
784 Function + compress_decode _Bool Compress*, uint8_t*, size_t, uint8_t*, size_t, size_t*
785 Function + compress_decode_streamed _Bool Compress*, CompressIoCallback, void*, CompressIoCallback, void*
786 Function + compress_encode _Bool Compress*, uint8_t*, size_t, uint8_t*, size_t, size_t*
787 Function + compress_free void Compress*
788 Function + compress_icon_alloc CompressIcon* size_t
789 Function + compress_icon_decode void CompressIcon*, const uint8_t*, uint8_t**
790 Function + compress_icon_free void CompressIcon*
791 Function + compress_stream_decoder_alloc CompressStreamDecoder* CompressType, const void*, CompressIoCallback, void*
792 Function + compress_stream_decoder_free void CompressStreamDecoder*
793 Function + compress_stream_decoder_read _Bool CompressStreamDecoder*, uint8_t*, size_t
794 Function + compress_stream_decoder_rewind _Bool CompressStreamDecoder*
795 Function + compress_stream_decoder_seek _Bool CompressStreamDecoder*, size_t
796 Function + compress_stream_decoder_tell size_t CompressStreamDecoder*
797 Function - copysign double double, double
798 Function - copysignf float float, float
799 Function - copysignl long double long double, long double
2624 Function + tar_archive_finalize _Bool TarArchive*
2625 Function + tar_archive_free void TarArchive*
2626 Function + tar_archive_get_entries_count int32_t TarArchive*
2627 Function + tar_archive_get_mode_for_path TarOpenMode const char*
2628 Function + tar_archive_get_read_progress _Bool TarArchive*, int32_t*, int32_t*
2629 Function + tar_archive_open _Bool TarArchive*, const char*, TarOpenMode
2630 Function + tar_archive_set_file_callback void TarArchive*, tar_unpack_file_cb, void*
2631 Function + tar_archive_store_data _Bool TarArchive*, const char*, const uint8_t*, const int32_t
2825 Variable - ble_profile_hid const FuriHalBleProfileTemplate*
2826 Variable - ble_profile_serial const FuriHalBleProfileTemplate*
2827 Variable + cli_vcp CliSession
2828 Variable + compress_config_heatshrink_default const CompressConfigHeatshrink
2829 Variable + firmware_api_interface const ElfApiInterface*
2830 Variable + furi_hal_i2c_bus_external FuriHalI2cBus
2831 Variable + furi_hal_i2c_bus_power FuriHalI2cBus