添加huffman算法

This commit is contained in:
ranchuan
2023-11-22 20:27:42 +08:00
parent fa2509c5af
commit e3f33b9a6d
9 changed files with 387 additions and 21 deletions

View File

@@ -106,6 +106,17 @@ uint8_t arr_get(array_def *a,int index)
}
void arr_reset(array_def *a,uint8_t d,int index)
{
param_check(a);
rt_mutex_take(a->mutex,RT_WAITING_FOREVER);
if(index<0) index=a->used+index;
if((index>=0&&index<a->used)==0){}
else a->data[index]=d;
rt_mutex_release(a->mutex);
}
uint8_t *arr_data(array_def *a)
{
param_check(a);