![](/img/trans.png)
[英]Compare equality of two Uint8Array
賞金將在 6 天后到期。 此問題的答案有資格獲得+50聲望賞金。 Brad正在尋找此問題的最新答案。 我正在使用 CRC32 比較兩個Uint8Array以確保解壓縮數據的准確性。 但是,我面臨的問題是沒有像Uint8Array.equal()這樣的 API 來比較 arrays。盡管 Node ...
[英]Compare equality of two Uint8Array
賞金將在 6 天后到期。 此問題的答案有資格獲得+50聲望賞金。 Brad正在尋找此問題的最新答案。 我正在使用 CRC32 比較兩個Uint8Array以確保解壓縮數據的准確性。 但是,我面臨的問題是沒有像Uint8Array.equal()這樣的 API 來比較 arrays。盡管 Node ...
[英]Return Uint8Array from function
我正在嘗試合並兩個 Uint8Array 並在此 function 中返回結果commandframe = new Uint8Array([0x01,0x00]); GetCRC16Full(commandframe, true); 在 Vscode 調試模式下,我可以在 function 中看到 ...
[英]How do I convert a List<dynamic> into a viewable image in Flutter?
sample.json 是一個包含 0 到 100 值列表的文件,在 header 下稱為“讀數”: 我正在嘗試解析 sample.json 中的數據以提取“讀數”數據並將其轉換為圖像。 “讀數”中共有 1728 個 integer 個值,范圍為 0 - 100。 我嘗試生成的圖像是 27 x ...
[英]Convert an array of UInt8 into a String in Swift
我有一組UInt8字符,我想將它們組合成一個有凝聚力的String 。 我知道String具有.utf8屬性,並且在這些字符上運行 for 循環是我制作UInt8數組的方式,但現在我需要反過來。 例如, UInt8數組: 和期望的最終結果: ...
[英]Construct chess board like texture with Uint8Array
代碼: 無論我做什么,我都會得到垂直的棋盤風格。 有什么建議嗎? ...
[英]Conver Uint8List to file in flutterweb
嗨,我在 flutter web 中上傳圖像並將其發送到服務器時遇到問題我需要向我們發送文件類型的圖像到服務器在我問之前,我會告訴你我正在努力的代碼 所以我想做的就是像下面的代碼一樣將 Xfile 制作成文件 和其他事情太使 Uint8List 歸檔 像這樣我已經用谷歌搜索了超過 4 天,但我無法找 ...
[英]How to convert async AsyncIterable<Uint8Array> to File in Javascript
您好,我正在從瀏覽器客戶端上的 HTML 表單向 Remix 應用程序服務器發送/發布文件。 Remix 應用程序服務器將我的文件作為異步 AsyncIterable 發送/處理。 我現在需要將其轉換回文件 object,以便可以將其作為 FormData 發送到后端服務器。 我嘗試了帶和不帶緩 ...
[英]JavaScript: TextDecoder on SharedArrayBuffer
我在 SharedArrayBuffer 上遇到 decode() 問題。 代碼: 錯誤: 這里有一個規范警告開發人員關於這種類型的內存的競爭條件。 我可以以某種方式強制解碼嗎? 我確信在解碼過程中數據不會改變。 或者有解決方法嗎? 原因:我想創建 Uint8Array 的單個副本並將其 ...
[英]How to get an array of strings based on Uint8Array values (map Uint8 values to String/s)
new Uint8Array([1,2,3]).map((v,y)=>"0"+v+"0"+y) > Uint8Array(3) [ 100, 201, 46 ] // actual > ["0100","0201","0302"] // expected new Uint8Arr ...
[英]Uint8Array is not showing correct values for PNG file
我正在嘗試使用瀏覽器中的 javascript 從后端解碼作為 Uint8Array 的 PNG 文件。 將 Uint8Array 從 15~28 切片並 console.logging 打印出以下內容:[82, 0, 0, 1, 0, 0, 0, 1, 0, 8, 6, 0, 0]。 如果我將這個 ...
[英]javascript: from a websocket I receive messages as zlib deflate: how to read OR "unflate" OR "deflate" (not inflate)
這個問題是關於從 websocket 消息轉換 gzip deflate 消息並將其轉換為我可以應用 JSON.parse 的數組或原始文本... *** 還要清楚:在這個問題中:我使用來自加密交換的 websocket....但問題是關於收到的消息而不是關於加密交換 在文檔中他們說“請使用 z ...
[英]TauriJS writeBinaryFile cannot freeze array buffer views with elements
我使用TauriJS並嘗試使用 jszip 修改 zip 文件,然后使用writeBinaryFile保存它。 這是我目前擁有的代碼。 問題是它給出了錯誤 Uncaught TypeError: Cannot freeze array buffer views with elements 我無 ...
[英]read CAR file using js-car
我在 javascript 中有一個CAR文件對象,並想使用js-car github讀取它。 但我不斷收到unexpected end of the file 。 這是我正在嘗試的代碼 let arrayBuffer = await files[0].arrayBuffer(); let byte ...
[英]How to convert a Javascript number to a Uint8Array?
我有一個 Javascript integer (其精度可以 go 高達2^53 - 1 ),我正在嘗試使用ArrayBuffer通過電線發送它。 我想我可以使用BigInt64Array ,但瀏覽器支持似乎仍然相對較新。 我不能使用Int32Array (這是我的原始解決方案),因為它的精度高達 ...
[英]Why this custom implementation slower than the built-in?
請問,為什么這個用戶制作的實現比內置的慢: 樣本: 自定義實現,使用Uint8List和 for 循環來拆分字節序列列表: 稍微自定義實現,使用Uint8List ,然后使用utf8.decode : 使用內置實現: 結果: ...
[英]The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array. Received type number - When using Uint8Array.slice()
我的代碼實現是 Uint8Array class 的以下擴展。 我收到錯誤: 每當我嘗試使用this.slice(start, end) 。 例如this.slice(4, 10); . 任何幫助是極大的贊賞。 ...
[英]Saving a numpy array in binary does not improve disk usage compared to uint8
我正在保存 numpy arrays,同時嘗試使用盡可能少的磁盤空間。 在此過程中,我意識到與 uint8 數組相比,保存 boolean numpy 數組不會提高磁盤使用率。 這是有原因的還是我在這里做錯了什么? 這是一個最小的例子: ...
[英]Taking byte stream (1s & 0s) and storing them in a uint8_t array
我正在嘗試獲取此字節 stream 的信息(1 和 0),並試圖將其存儲在 uint8_t 數組中(每個索引都是一個字節長,8 位)。 我很難掌握如何將 8 位存儲到給定 bitmapSize 的 1 個索引位置(對於本例為 4)。 所以我們會有一個大小為 4 的 uint8_t 數組,其中 out ...
[英]How to get file contents from ipfs-http-client
我正在使用 ipfs-http-client 讀取文件格式 infura 的內容,如何使用“cat”功能正確獲取字符串/json 格式的數據? const client = create({ url: ipfsUrl(), headers: { authorization ...
[英]ROS2: how to create an Int8MultiArray
這是一個 ROS2 初學者的問題我嘗試使用幾個建議我包含“std_msgs/Int8MultiArray.h”的 ROS 源。 但是,如果我這樣做,我會收到一個錯誤,即 在 ROS2 中使用類數組結構的正確方法是什么? 如果有類似的hpp header,應該在哪里參考呢? 謝謝! 任何建議將不勝感 ...