Add VLQ
This commit is contained in:
parent
2364bc6809
commit
c341e973b1
2 changed files with 5 additions and 1 deletions
|
|
@ -53,5 +53,5 @@ u32 axl_vlq_decode(const u8* in, u32* num)
|
|||
}
|
||||
}
|
||||
|
||||
return 0; //incomplete
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
4
main.c
4
main.c
|
|
@ -31,6 +31,7 @@ int _start(void)
|
|||
(void)f;
|
||||
|
||||
|
||||
u32 new_len = 0;
|
||||
u8 src[] = "Bonjour le monde!";
|
||||
u32 src_len = axl_strlen((i8*)src);
|
||||
for(u32 i = 0; i < src_len; i += 4)
|
||||
|
|
@ -38,11 +39,14 @@ int _start(void)
|
|||
u8 buff[AXL_VLQ_MAX_LEN + 1];
|
||||
|
||||
u32 encoded_l = axl_vlq_encode(*((u32*)(src + i)), buff);
|
||||
new_len += encoded_l;
|
||||
|
||||
buff[encoded_l] = '\0';
|
||||
|
||||
axl_puts((i8*)buff);
|
||||
}
|
||||
(void)new_len;
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue