1
0

nixio.bin.lua 874 B

123456789101112131415161718192021222324252627282930313233
  1. --- Binary operations and conversion.
  2. module "nixio.bin"
  3. --- Return a hexadecimal ASCII represantation of the content of a buffer.
  4. -- @class function
  5. -- @name hexlify
  6. -- @param buffer Buffer
  7. -- @return representation using characters [0-9a-f]
  8. --- Return a binary buffer from a hexadecimal ASCII representation.
  9. -- @class function
  10. -- @name unhexlify
  11. -- @param hexvalue representation using characters [0-9a-f]
  12. -- @return binary data
  13. --- Calculate the CRC32 value of a buffer.
  14. -- @class function
  15. -- @name crc32
  16. -- @param buffer Buffer
  17. -- @param initial Initial CRC32 value (optional)
  18. -- @return crc32 value
  19. --- Base64 encode a given buffer.
  20. -- @class function
  21. -- @name b64encode
  22. -- @param buffer Buffer
  23. -- @return base64 encoded buffer
  24. --- Base64 decode a given buffer.
  25. -- @class function
  26. -- @name b64decode
  27. -- @param buffer Base 64 Encoded data
  28. -- @return binary data