Skip to content

Commit c10ba58

Browse files
committed
Remove unnecessary float to buffer conversion functions
1 parent e462b5d commit c10ba58

File tree

1 file changed

+0
-26
lines changed

1 file changed

+0
-26
lines changed

redisinsight/ui/src/utils/formatters/bufferFormatters.ts

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -107,30 +107,6 @@ const ASCIIToBuffer = (strInit: string) => {
107107
return anyToBuffer(Array.from(Buffer.from(result, 'hex')))
108108
}
109109

110-
const float32ArrayToBuffer = (vector: Float32Array) => {
111-
const buffer = new ArrayBuffer(npVector.length * 4)
112-
const dataView = new DataView(buffer)
113-
114-
for(let i = 0; i < npVector.length; i++) {
115-
dataView.setFloat32(i * 4, npVector[i], true)
116-
}
117-
118-
return new Uint8Array(buffer)
119-
}
120-
121-
122-
const float64ArrayToBuffer = (vector: Float64Array) => {
123-
const buffer = new ArrayBuffer(npVector.length * 8)
124-
const dataView = new DataView(buffer)
125-
126-
for(let i = 0; i < npVector.length; i++) {
127-
dataView.setFloat64(i * 8, npVector[i], true)
128-
}
129-
130-
return new Uint8Array(buffer)
131-
}
132-
133-
134110
const bufferToFloat32Array = (data: Uint8Array) => {
135111
const buffer = new Uint8Array(data).buffer
136112
const dataView = new DataView(buffer)
@@ -236,8 +212,6 @@ export {
236212
bufferToJava,
237213
bufferToFloat32Array,
238214
bufferToFloat64Array,
239-
float32ArrayToBuffer,
240-
float64ArrayToBuffer,
241215
}
242216

243217
window.ri = {

0 commit comments

Comments
 (0)