Handbook
Glossary
byte-vector
Factor handbook
»
The language
»
Collections
»
Byte vectors
Next:
byte-vector? ( object -- ? )
Vocabulary
byte-vectors
Class description
The class of resizable byte vectors. See
Byte vectors
for information.
Definition
USING:
byte-arrays
sequences.private
;
IN:
byte-vectors
TUPLE:
byte-vector
{
underlying
byte-array
initial:
B{
}
}
{
length
array-capacity
initial:
0
}
;
Methods
USING:
byte-vectors
prettyprint.custom
;
M:
byte-vector
>pprint-sequence
;
USING:
alien
byte-vectors
sequences
;
M:
byte-vector
byte-length
length
;
USING:
byte-vectors
growable
kernel
;
M:
byte-vector
contract
2drop
;
inline
USING:
alien
byte-vectors
kernel
;
M:
byte-vector
element-size
drop
1
;
inline
USING:
byte-vectors
kernel
sequences
;
M:
byte-vector
equal?
over
byte-vector?
[
sequence=
]
[
2drop
f
]
if
;
USING:
accessors
byte-vectors
tools.hexdump
tools.hexdump.private
;
M:
byte-vector
hexdump.
all-bytes
underlying>>
hexdump-bytes
;
USING:
byte-arrays
byte-vectors
kernel
sequences
;
M:
byte-vector
like
drop
dup
byte-vector?
[
dup
byte-array?
[
dup
length
byte-vector
boa
]
[
>byte-vector
]
if
]
unless
;
inline
USING:
byte-vectors
kernel
sequences
;
M:
byte-vector
new-resizable
drop
<byte-vector>
;
inline
USING:
byte-arrays
byte-vectors
kernel
math
sequences
;
M:
byte-vector
new-sequence
drop
[
(byte-array)
]
[
>fixnum
]
bi
byte-vector
boa
;
inline
USING:
byte-vectors
prettyprint.custom
;
M:
byte-vector
pprint*
pprint-object
;
USING:
byte-vectors
kernel
prettyprint.custom
;
M:
byte-vector
pprint-delims
drop
\
BV{
\
}
;
USING:
byte-vectors
kernel
prettyprint.custom
;
M:
byte-vector
pprint-narrow?
drop
f
;
USING:
byte-vectors
io
kernel
;
M:
byte-vector
stream-element-type
drop
+byte+
;
inline
USING:
byte-vectors
io
sequences
;
M:
byte-vector
stream-tell
length
;
inline
USING:
alien
byte-arrays
byte-vectors
io
kernel
libc
math
sequences
;
M:
byte-vector
stream-write
over
byte-array?
[
push-all
]
[
2dup
[
byte-length
]
bi@
3dup
+
swap
lengthen
[
tail-slice
swap
]
curry
dip
memcpy
]
if
;