Replies: 1 comment 2 replies
-
Hi @cremor I've never actually tested either approach I always just worked with the bytes directly. It makes sense then not to use it for filestream. As for networkstream I've not worked with one in the past, I'd be surprised it's even supported since I assume it wouldn't support seek operations but if it is then consumers would need to profile to determine if bufferedstream helps. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi @EliotJones,
In #47 (comment) you recommended to use a
BufferedStream
as a wrapper around aNetworkStream
when reading PDFs. Do you still recommend that? Or have there been any changes to PdfPig since that comment so that this isn't needed any more?In #253 (comment) you also recommend a
BufferedStream
around aFileStream
. Did you test that this actually improves performance?I'm asking because I found this in the .NET source code:
Source: https://referencesource.microsoft.com/#mscorlib/system/io/bufferedstream.cs,100
Also, what about
PdfDocumentBuilder
? Does it also do random seeking/writing?Beta Was this translation helpful? Give feedback.
All reactions