substantial refactoring of api and decoder internals
This commit is contained in:
parent
c3bdc3b681
commit
cff4d17561
9 changed files with 304 additions and 718 deletions
|
@ -86,25 +86,25 @@
|
|||
%% compilation macros for unified decoder
|
||||
-ifdef(utf8).
|
||||
-define(encoding, utf8).
|
||||
-define(symbol_size, 1).
|
||||
-define(partial_codepoint(Bin), byte_size(Bin) >= 1).
|
||||
-endif.
|
||||
|
||||
-ifdef(utf16).
|
||||
-define(encoding, utf16).
|
||||
-define(symbol_size, 2).
|
||||
-define(partial_codepoint(Bin), byte_size(Bin) >= 2).
|
||||
-endif.
|
||||
|
||||
-ifdef(utf16le).
|
||||
-define(encoding, utf16-little).
|
||||
-define(symbol_size, 2).
|
||||
-define(partial_codepoint(Bin), byte_size(Bin) >= 2).
|
||||
-endif.
|
||||
|
||||
-ifdef(utf32).
|
||||
-define(encoding, utf32).
|
||||
-define(symbol_size, 4).
|
||||
-define(partial_codepoint(Bin), byte_size(Bin) >= 4).
|
||||
-endif.
|
||||
|
||||
-ifdef(utf32le).
|
||||
-define(encoding, utf32-little).
|
||||
-define(symbol_size, 4).
|
||||
-define(partial_codepoint(Bin), byte_size(Bin) >= 4).
|
||||
-endif.
|
Loading…
Add table
Add a link
Reference in a new issue