Skip to content

Commit cde0bb0

Browse files
authored
feat: initial streams support and convert to I/O module (#20)
* feat: initial implementation of native streams * feat: introduce File API and new Blob * fix: use real file size to prevent buffer overflow * fix: tigthen WebSocket.send per spec
1 parent c348e0f commit cde0bb0

File tree

126 files changed

+4351
-1581
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+4351
-1581
lines changed

README.md

+11-671
Large diffs are not rendered by default.

docs/blob.md

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Blob
2+
3+
## Usage
4+
5+
[TBD]
6+
7+
## Differences with React Native's `Blob`
8+
9+
- Can create `Blob`s from `ArrayBuffer`, `ArrayBufferView` too. With React Native, [you can only create Blob from string or another Blob](https://github.com/facebook/react-native/blob/af384a914a4e9ef6a5d25b00bc14b0483e5af879/packages/react-native/Libraries/Blob/BlobManager.js#L69-L73)
10+
- Each `Blob` has `text()`, `arrayBuffer()`, and `stream()` methods. With React Native, you can only access the contents of `Blob` via [custom `data` field](https://github.com/facebook/react-native/blob/af384a914a4e9ef6a5d25b00bc14b0483e5af879/packages/react-native/Libraries/Blob/Blob.js#L75-L82)
11+
- `Blob` does not depend on a native module. Uses `ArrayBuffer`s natively, thanks to Nitro Modules. With React Native, [Blob uses `RCTBlobManager` under the hood](https://github.com/facebook/react-native/blob/bd323929dc5be5666ee36043babec7d981a095dc/packages/react-native/Libraries/Blob/RCTBlobManager.h#L15) to create and hold references to the data.
12+
- `Blob` is automatically deallocated when no longer in use. [You don't have to `close()` it manually](https://github.com/facebook/react-native/blob/bd323929dc5be5666ee36043babec7d981a095dc/packages/react-native/Libraries/Blob/Blob.js#L122-L138)

docs/network.md

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Networking
2+
3+
## Usage
4+
5+
[TBD]
6+
7+
## Differences with React Native's `fetch`
8+
9+
[TBD]
10+
11+
## Differences with Expo's `fetch`
12+
13+
[TBD]

docs/streams.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Streams
2+
3+
## Usage
4+
5+
[TBD]

0 commit comments

Comments
 (0)