Comments (2)
If I understand correctly, you suggest to add the packet size at the start of each packet. This would be a modification of the network protocol.
I was trying to understand how, given a protocol, I could use restructure
to parse it knowing that the chunks I receive are not always aligned on the restructure
specifications.
It seems like https://www.npmjs.com/package/binary-data handles this by waiting for additional chunks when there is not enough data.
from restructure.
Is there a plan to make
DecodeStream
work with streams and be aware of boundary issues ?
To do so, a field corresponding to the packet size must be placed at the beginning of each packet like what VersionedStruct does with version number. It affects the stream design approach, it is no nothing :(
from restructure.
Related Issues (20)
- [idea] offsetOf for Struct
- Unusable with CSP directives HOT 14
- Missing LICENSE file. HOT 1
- Fixed-length types not encoding as expected
- feat: magic byte HOT 1
- feat: parsing stream by frames
- Int of 4 bytes not exists? HOT 1
- Causing unsafe eval issue: is it solved? HOT 1
- Release new version HOT 6
- `int64`/`uint64` support via `BigInt`
- ReferenceError: TextEncoder is not defined HOT 5
- Access field in sub struct of current struct HOT 1
- bug: utf16 strings do not correctly null-terminate
- Issue with npm Buffer dependency in DecodeStream.js HOT 1
- [Question] Any possibility of TS declaration support? HOT 2
- Parcel cache got published on npm
- Optional type, different argument for function in encode and decode
- Unsupported string encodings HOT 3
- Version 3.0.1 causes `react-pdf` `renderToStream` to never return HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from restructure.