Python Forum
JS Buffer.from VS struct.pack
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
JS Buffer.from VS struct.pack
#3
(Apr-05-2021, 03:14 PM)deanhystad Wrote: Why are you testing with a map? Test by writing an unsigned int or a string. I would write a test for each data type and compare the resulting files.

Just tested both versions with the same inputs and (unfortunately?) got the same output file from both.

I have seen that write_UInt8 is called about 15 times more that it should. I found this issue before but I didn't really figure out why, for some reason, so that's what I'm looking at now. It may well be the same for some other functions too.
Reply


Messages In This Thread
JS Buffer.from VS struct.pack - by DreamingInsanity - Apr-05-2021, 02:58 PM
RE: JS Buffer.from VS struct.pack - by deanhystad - Apr-05-2021, 03:14 PM
RE: JS Buffer.from VS struct.pack - by DreamingInsanity - Apr-05-2021, 04:30 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Python Struct Question, decimal 10, \n and \x0a. 3python 2 676 Aug-11-2023, 09:29 AM
Last Post: 3python
  Read buffer from bluetooth frohr 2 2,158 Jun-01-2022, 01:31 PM
Last Post: frohr
  Seperate output buffer matt_the_hall 2 2,373 Mar-15-2021, 08:44 PM
Last Post: matt_the_hall
  PyAudio Buffer Data Calculation MclarenF1 0 2,143 Aug-21-2020, 10:55 AM
Last Post: MclarenF1
  struct.unpack failed Roro 2 3,368 Jun-13-2020, 05:28 PM
Last Post: DreamingInsanity
  Pack integer values as single bytes in a struct bhdschmidt 3 2,354 Jun-09-2020, 09:23 PM
Last Post: bhdschmidt
  struct.decode() and '\0' deanhystad 1 3,239 Apr-09-2020, 04:13 PM
Last Post: TomToad
  Additional buffer for Windows constantin01 0 1,406 Mar-31-2020, 10:24 AM
Last Post: constantin01
  Getting MemoryError frames.write(buffer) kunwarsingh 0 1,619 Feb-10-2020, 09:39 PM
Last Post: kunwarsingh
  How to remove empty struct from matlab file in python? python_newbie09 0 2,392 Jun-25-2019, 12:13 PM
Last Post: python_newbie09

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020