View source: R/varint_handling.R
varint_bytes_to_binary | R Documentation |
The function takes a vector of varint bytes and parses them into an array of integers (in binary format). For varints, the most significant bit indicates whether the next byte belongs to the same integer (1) or if it is the last byte (0).
varint_bytes_to_binary(bytearray)
bytearray |
character vector with each entry representing one byte ("01110011") |
If the input is a valid array of varint bytes, the function returns the corresponding integers in binary
lordecks:::varint_bytes_to_binary("01111111") # returns "1111111" # = 127 lordecks:::varint_bytes_to_binary(c("01111111", "10000000", "00000001", "11011001", "00000001")) # returns c(1111111, 00000010000000, 00000011011001) # = c(127, 128, 217)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.