input stream from input stream?

From: Albert Reiner (albert_at_chello.at)
Date: 01/31/04

  • Next message: Matthew Danish: "Re: Lisp's future"
    Date: Sat, 31 Jan 2004 14:10:57 GMT
    
    

    Hi,

    I am in the first stages of getting to know CL, and I want to read large data
    files (so large that I cannot read all of it at once into memory without
    swapping) that look something like

        ...
        Xasdflksdfasdlfjasdflasdfj
        Xoiwerlxciwladlfjasdfklsdk
        ...

    Where the data I am interested in would be

        ...asdflksdfasdlfjasdflasdfjoiwerlxciwladlfjasdfklsdk...

    So it seems most natural to me to open the file as an input stream, and make a
    new input stream from that by taking care of discarding X at the beginning of
    the lines and concatenating the data. (Analogously for output to a stream.)

    I have been reading a bit on streams in the HyperSpec and CLtL2 but do not
    seem to find a way of constructing one stream from another one with additional
    processing. Is this not a sensible way of doing things, or where should I
    look?

    Thanks for any pointers,

    Albert.

    PS: I know about the RtL, and I have no idea about sports.


  • Next message: Matthew Danish: "Re: Lisp's future"

    Relevant Pages

    • Re: (C) another system() question...
      ... towards you is the "input stream" and all the water going away from ... You have a jug in which you can store ...
      (alt.comp.lang.learn.c-cpp)
    • Re: fflush and stdin
      ... Some implementations do define what fflush does on an input stream, ... so that implementations can do whatever they like. ... extension pop out immediately during porting, ...
      (comp.lang.c)
    • Re: input stream 101
      ... "This abstract class is the superclass of all ... >classes representing an input stream of bytes." ... >extending inputStream really be what's passed? ...
      (comp.lang.java.help)
    • Re: setbuf(stdin,NULL) cant work, why?
      ... > can set the stadard input stream unbuffered. ... > c1 = getchar(); ... If you enter a single character ...
      (comp.lang.c)
    • Re: input stream from input stream?
      ... > I am in the first stages of getting to know CL, and I want to read large data ... > So it seems most natural to me to open the file as an input stream, ... Simple-streams is always available in Allegro CL, ...
      (comp.lang.lisp)