Comments (5)
I would not call this size number a medium.
On Sep 7, 2014 12:26 PM, "Adrian Cole" [email protected] wrote:
Conceding this is an uncommon use case, http2 has a 24bit unsigned length
field. It feel cleaner if okhttp could ask okio to read/writeMedium.https://tools.ietf.org/html/draft-ietf-httpbis-http2-14#section-4.1
—
Reply to this email directly or view it on GitHub
#74.
from okio.
Since there's no native type at this size and the use case is small I'm
leaning toward not having this as a first-party API.
The alternative for consumers is a convenience method which does a
readFully on a byte[3](or require%283%29 and 3x readByte) and converts to an
int, right?
On Sep 7, 2014 3:49 PM, "Jake Wharton" [email protected] wrote:
I would not call this size number a medium.
On Sep 7, 2014 12:26 PM, "Adrian Cole" [email protected] wrote:Conceding this is an uncommon use case, http2 has a 24bit unsigned length
field. It feel cleaner if okhttp could ask okio to read/writeMedium.https://tools.ietf.org/html/draft-ietf-httpbis-http2-14#section-4.1
—
Reply to this email directly or view it on GitHub
#74.
from okio.
yeah I don't know a good name. Just netty calls it medium.
http://netty.io/4.0/api/io/netty/buffer/ByteBuf.html#readMedium()
from okio.
Oh, nice.
On Sep 7, 2014 4:09 PM, "Adrian Cole" [email protected] wrote:
yeah I don't know a good name. Just netty calls it medium.
http://netty.io/4.0/api/io/netty/buffer/ByteBuf.html#readMedium()—
Reply to this email directly or view it on GitHub
#74 (comment).
from okio.
I have to admit that I don't regularly encounter 24-bit numbers. Then
again, I haven't written a lot of binary protocol or encoding stuff either.
Quick googling suggests http/2 (frame length) and BLE (CRC) are the hottest
users of 24-bit numbers these days. http/2 has changed minds often, so
maybe 24-bit ain't forever there.. So, I can see an argument against adding
medium or similarly named.
If we don't, then yeah I think we can make a utility which requires 3 then
reads the bytes and shifts them into an int.
from okio.
Related Issues (20)
- what verison do I need to update For fixing CVE-2023-3635 HOT 5
- ZipFileSystem.metadata leaves file open
- Aborting read on Pipe HOT 1
- Musing about allocate() and allocateDirect() and WASM HOT 1
- Potential file leak in `FileSystem.read()` method HOT 9
- Feature request: set endianess at library level HOT 3
- Invalid java classname in GzipSource.kt HOT 5
- Is exposing flush in Sink a good idea ? HOT 2
- Gradle reports that okio references itself HOT 2
- Add target `watchosDeviceArm64` HOT 2
- Publish okio-fakefilesystem with wasm support HOT 1
- NullPointerException on commonCompleteSegmentByteCount HOT 4
- Using FileSystem.SYSTEM.listRecursively() on MacOS, it returns incorrect directory name. HOT 3
- Update multiplatform example docs for file system HOT 1
- Gitt
- Add zip file support on non-JVM targets. HOT 3
- Pipe.fold: destination sink can remain open even after pipe closed HOT 2
- The compatibility issue with TarArchiveOutputStream
- Github lives
- ZipFileSystem should expose more metadata HOT 1
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 okio.