Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

206
Vistas
C# .NET Make GZipStream From Part of Another (large) Stream

So I want to decompress some data stored in a file. The solution I am currently using looks roughly like this:

FileStream fileStream = new FileStream([File path or whatever])
BinaryReader brStream = new BinaryReader(fileStream)

brStream.BaseStream.Position = [Address of the data I want]
byte[] relevantBytes = brStream.readBytes([Length of the data I want])

MemoryStream memoryStream = new MemoryStream(relevantBytes)
GZipStream gZipStream = new GZipStream(memoryStream, CompressionMode.Decompress)

But the problem arises when the data I'm compressing/decompressing is large. I don't want all of that in memory. I would prefer to give GZipStream a FileStream with a starting index and length. How can I do that?

over 4 years ago · Santiago Trujillo
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda