altavir
04/01/2020, 7:04 PMkevin.cianfarini
04/20/2020, 2:12 PMkevin.cianfarini
04/22/2020, 8:43 PMBytes
to go internal, do we plan to have any equivalent to ByteString
from okio? Input doesn't seem to entirely fit the billaltavir
04/24/2020, 8:33 AMidea.active
flag is set in the system. Could you explain what does it mean?altavir
04/24/2020, 8:39 AMaltavir
04/24/2020, 1:22 PMaltavir
08/19/2020, 11:41 AMsaket
10/15/2020, 4:10 AMsaket
10/15/2020, 4:10 AMShawn Witte
10/30/2020, 8:35 PMsaket
11/06/2020, 10:53 PMsaket
11/06/2020, 10:53 PMAndrey Martynov
02/09/2021, 8:28 AMaltavir
02/28/2021, 3:30 PMreadBytes
method does not actually advance the input read pointer. Is it intentional?Imran/Malic
08/27/2021, 5:19 AMsaket
10/23/2021, 8:20 PMjimn
10/29/2021, 8:12 AMImran/Malic
01/24/2022, 1:45 PMDidier Villevalois
07/09/2022, 8:53 AMktor-network
socket, (2) parse a message using google-flatbuffers
which contains a packed scalar array, (3) that is itself fed to multik
to make a multi-dimensional array of it. Along all this processing line, it is possible to have a single byte array backing multiple buffers and not have to copy any bytes.
However, it is a lot of work currently because there is no standard buffer API. For instance, google-flatbuffers
is defining their own Buffer API to support this no-copy principle: https://github.com/google/flatbuffers/blob/master/kotlin/flatbuffers-kotlin/src/commonMain/kotlin/com/google/flatbuffers/kotlin/Buffers.kt
In the above-mentioned use-case for instance, I have to implement my own com.google.flatbuffers.kotlin.ReadBuffer
above `ktor-io`'s <http://io.ktor.utils.io|io.ktor.utils.io>.core.ByteReadPacket
, etc
Isn't it time that people from Okio, Ktor and others get together to define a standard Buffer API and revive kotlinx-io
??
(Sorry for the kinda rant but it is a little irritating...)Didier Villevalois
12/21/2022, 11:45 AMWe’re extracting the IO functionality into a separate library. This is a long-standing task that we’ve been working on gradually, and aim to finalize in 2023.❤️ K @e5l, @Oleg Yukhnevich Will this also include
ktor-network
?Todd
07/13/2023, 1:27 PMaltavir
07/15/2023, 7:50 AMEdoardo Luppi
08/27/2023, 3:38 PMBuffer
with an initial size?
I need to write quite some data, so an initial optimization would be good to haveDidier Villevalois
09/11/2023, 10:47 AMkotlinx-io
reincarnation.
I would like to write a kotlinx-io
adapter for `flatbuffers-kotlin`' ReadWriteBuffer
. To do that I would need random-access read and write to buffers. Is this something that is on the roadmap?
I stumbled upon this issue but it was created for the previous incarnation of kotlinx-io
.
To clarify my use-case:
• flatbuffers-kotlin
's ReadBuffer
interface has a limit
property indicating the read limit and only offers random-access reads (up to limit
).
• flatbuffers-kotlin
's ReadWriteBuffer
interface extends ReadBuffer
, has a writePosition
(equals limit
) property, a writeLimit
property and a capacity
property, and offers both sequential writes (updating writePosition
adequately) and random-access writes (up to capacity
).
• All read and write operations are in Little Endian byte order.kevinherron
09/15/2023, 1:39 AM// Length placeholder...
int lengthStartIndex = buffer.writerIndex();
buffer.writeShort(0);
buffer.writeInt((int) packet.getSessionHandle());
buffer.writeInt(packet.getStatus().getStatus());
buffer.writeLong(packet.getSenderContext());
buffer.writeInt(0);
int dataStartIndex = buffer.writerIndex();
if (packet.getCommand() != null) {
encodeCommand(packet.getCommand(), buffer);
}
// Go back and update the length.
int bytesWritten = buffer.writerIndex() - dataStartIndex;
buffer.markWriterIndex();
buffer.writerIndex(lengthStartIndex);
buffer.writeShort(bytesWritten);
buffer.resetWriterIndex();
Didier Villevalois
10/10/2023, 12:46 PMBufferedSource
property that tells me how many bytes I have already read. It seems there is no direct mean to do that. I have routines that read individual packets from a BufferedSource
. How would you proceed?elect
10/15/2023, 2:51 PMBuffer
?Wouter De Vos
10/16/2023, 2:28 PMelect
10/17/2023, 11:23 AMSYSTEM
on FileSystem
(only SYSTEM_TEMPORARY_DIRECTORY
)
am I missing anything?elect
10/17/2023, 12:06 PMval path = "/home/elect/IdeaProjects/scifio-lifesci/test.sdt".toPath()
println(HostFileSystem.exists(path))
println(HostFileSystem.source(path).buffer().buffer.size)
> true
> 0
but test.sdt is not empty..
> -rw-rw-r-- 1 elect elect 4892652 ott 15 17:38 test.sdt
I have my logic expecting a Buffer
, that's what I understood is something I can "consume" (I need to read sequentially and sparse)