Created
October 4, 2010 16:21
-
-
Save nox/609977 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
length_coded_binary(<<Length/little, Bin:Length/binary, Rest/binary>>) when Length =< 250 -> | |
{Bin, Rest}; | |
length_coded_binary(<<252/little, Length:16/little, Bin:Length/binary, Rest/binary>>) -> | |
{Bin, Rest}; | |
length_coded_binary(<<253/little, Length:24/little, Bin:Length/binary, Rest/binary>>) -> | |
{Bin, Rest}; | |
length_coded_binary(<<254/little, Length:64/little, Bin:Length/binary, Rest/binary>>) -> | |
{Bin, Rest}. | |
column_value(<<251/little, Rest/binary>>) -> | |
{null, Rest}; | |
column_value(Bin) -> | |
length_coded_binary(Bin). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment