uget/uset #
empty #
@[deprecated ByteArray.data_mkEmpty (since := "2024-08-13")]
Alias of ByteArray.data_mkEmpty
.
@[deprecated ByteArray.data_empty (since := "2024-08-13")]
Alias of ByteArray.data_empty
.
push #
@[simp]
@[deprecated ByteArray.data_push (since := "2024-08-13")]
Alias of ByteArray.data_push
.
set #
@[deprecated ByteArray.data_set (since := "2024-08-13")]
theorem
ByteArray.set_data
(a : ByteArray)
(i : Fin a.size)
(v : UInt8)
:
(a.set (↑i) v ⋯).data = a.data.set (↑i) v ⋯
Alias of ByteArray.data_set
.
copySlice #
@[deprecated ByteArray.data_copySlice (since := "2024-08-13")]
theorem
ByteArray.copySlice_data
(a : ByteArray)
(i : Nat)
(b : ByteArray)
(j len : Nat)
(exact : Bool)
:
Alias of ByteArray.data_copySlice
.
append #
@[deprecated ByteArray.data_append (since := "2024-08-13")]
Alias of ByteArray.data_append
.
extract #
@[simp]
theorem
ByteArray.data_extract
(a : ByteArray)
(start stop : Nat)
:
(a.extract start stop).data = a.data.extract start stop
@[deprecated ByteArray.data_extract (since := "2024-08-13")]
theorem
ByteArray.extract_data
(a : ByteArray)
(start stop : Nat)
:
(a.extract start stop).data = a.data.extract start stop
Alias of ByteArray.data_extract
.
ofFn #
Equations
- ByteArray.ofFn f = { data := Array.ofFn f }
Instances For
@[simp]
@[deprecated ByteArray.data_ofFn (since := "2024-08-13")]
Alias of ByteArray.data_ofFn
.
map/mapM #
@[inline]
unsafe def
ByteArray.mapMUnsafe
{m : Type → Type u_1}
[Monad m]
(a : ByteArray)
(f : UInt8 → m UInt8)
:
Unsafe optimized implementation of mapM
.
This function is unsafe because it relies on the implementation limit that the size of an array is
always less than USize.size
.
Equations
- a.mapMUnsafe f = ByteArray.mapMUnsafe.loop f a 0 a.usize