Vim documentation: vital/Vim/Type/Blob
main help file
vital/Vim/Type/Blob.txt Utilities for Blob data.
Maintainer: Tsuyoshi CHO <Tsuyoshi.CHO+develop@Gmail.com>
==============================================================================
CONTENTS Vital.Vim.Type.Blob-contents
INTRODUCTION Vital.Vim.Type.Blob-introduction
INTERFACE Vital.Vim.Type.Blob-interface
Functions Vital.Vim.Type.Blob-functions
==============================================================================
INTRODUCTION Vital.Vim.Type.Blob-introduction
Vital.Vim.Type.Blob is Blob data utility.
==============================================================================
INTERFACE Vital.Vim.Type.Blob-interface
------------------------------------------------------------------------------
FUNCTIONS Vital.Vim.Type.Blob-functions
Create Function
new({length}) Vital.Vim.Type.Blob.new()
Return new blob ({length} byte), data fill in 0.
Unsigned Integer Create/Cast Function
uint8({initial value}) Vital.Vim.Type.Blob.uint8()
Return uint8 (1 byte) blob.
Optional, data fill in {initial value}.
{initial value} support for:
- Number(positive int)
- String(hex num string)
- Bytes-like List(unmatch size ok)
- Blob(unmatch size ok)
uint16({initial value}) Vital.Vim.Type.Blob.uint16()
Return uint16 (2 byte) blob.
Optional, data fill in {initial value}.{initial value} support same as
Vital.Vim.Type.Blob.uint8().
uint32({initial value}) Vital.Vim.Type.Blob.uint32()
Return uint32 (4 byte) blob.
Optional, data fill in {initial value}.{initial value} support same as
Vital.Vim.Type.Blob.uint8().
uint64({initial value}) Vital.Vim.Type.Blob.uint64()
Return uint64 (8 byte) blob.
Optional, data fill in {initial value}.{initial value} support same as
Vital.Vim.Type.Blob.uint8().
Bitwise Function
or({X}, {Y}) Vital.Vim.Type.Blob.or()
Return new blob that is {X} or {Y} value.
NOTE: {X} and {Y} as same size.
xor({X}, {Y}) Vital.Vim.Type.Blob.xor()
Return new blob that is {X} xor {Y} value.
NOTE: {X} and {Y} as same size.
and({X}, {Y}) Vital.Vim.Type.Blob.and()
Return new blob that is {X} and {Y} value.
NOTE: {X} and {Y} as same size.
invert({X}) Vital.Vim.Type.Blob.invert()
Return new blob that is invert {X} value.
rotl({X}, {bits}) Vital.Vim.Type.Blob.rotl()
rotateleft({X}, {bits}) Vital.Vim.Type.Blob.rotateleft()
Return new blob that is {X} rotate {bits} bit left value.
NOTE:rotl is shortage function.
rotr({X}, {bits}) Vital.Vim.Type.Blob.rotr()
rotateright({X}, {bits}) Vital.Vim.Type.Blob.rotateright()
Return new blob that is {X} rotate {bits} bit right value.
NOTE:rotr is shortage function.
Arithmetic Function
add({X}, {Y}) Vital.Vim.Type.Blob.add()
Return new blob that is {X} + {Y} value.
NOTE: {X} is blob, {Y} blob or number.
mul({X}, {Y}) Vital.Vim.Type.Blob.mul()
Return new blob that is {X} * {Y} value.
NOTE: {X} is blob, {Y} blob or number.
rshift({X}, {bits}) Vital.Vim.Type.Blob.rshift()
Return new blob that is {X} right shift {bits} bit value.
lshift({X}, {bits}) Vital.Vim.Type.Blob.lshift()
Return new blob that is {X} left shift {bits} bit value.
Arithmetic Unsigned Integer Function
uint_add({X}, {Y}, {flag}) Vital.Vim.Type.Blob.uint_add()
Return new blob that is {X} + {Y} value.
Value keep as O({X}(or {Y})) uint size.
NOTE: {X} and {Y} as same size.
NOTE: When {flag} set "overflow", check overflow.
If result overflow, then throw exception.
uint_mul({X}, {Y}) Vital.Vim.Type.Blob.uint_mul()
Return new blob that is {X} * {Y} value.
Value keep as O({X}(or {Y}) * 2) uint size(if uint8 * uint8, then
result are uint16).
NOTE: {X} and {Y} as same size.
==============================================================================
vim:tw=78:fo=tcq2mM:ts=8:ft=help:norl:noet:fen:
top - main help file - tag index