Subject | Re: [Firebird-Java] Re: Picture Servlet Problems possibly OT |
---|---|
Author | Ann W. Harrison |
Post date | 2003-06-09T15:34:25Z |
At 07:16 PM 6/8/2003 +0000, Roman Rokytskyy wrote:
that automatically generated requests from higher level language as
to the appropriate length for transmission between the database and
the client.
A segmented blob contains two bytes of segment length, followed by
that many bytes of data, followed by the length of the next segment,
that segment, etc.
segmented blobs. In the case of a stream blob get_segment will
return full buffers as long as there is still data in the blob.
In the case of a segmented blob, get_segment will either return
a segment which may be the size of the buffer or smaller, or it
will return a full buffer and a status code saying that the
segment is not yet complete.
the number of segments (segmented only, of course), the length of
the longest segment (handy if you're constructing buffers on the
fly), and the total length of the blob. Seek works only on stream
blobs (because of the length bytes that occur at irregular intervals
in segmented blobs), but it provides three modes - from start,
from current position, and from end (requires a negative offset).
Regards
Ann
>In old good times idea was to introduce some kind of "natural" blockThe segment length was an indicator for gpre and qli and other tools
>size for some content. If I remember correctly, Ann or Paul B. have
>told that the idea was to add automatically a new line in text fields
>(that is why in documentation you see segment size 80, size of one
>line of ASCII on the screen).
that automatically generated requests from higher level language as
to the appropriate length for transmission between the database and
the client.
> As I understand, segment size influencesYes, but you can store different length segments in a single blob.
>the way blob is stored on the database page.
A segmented blob contains two bytes of segment length, followed by
that many bytes of data, followed by the length of the next segment,
that segment, etc.
> Also it is used in blobThe get_segment and put_segment calls are used in both stream and
>filters.
segmented blobs. In the case of a stream blob get_segment will
return full buffers as long as there is still data in the blob.
In the case of a segmented blob, get_segment will either return
a segment which may be the size of the buffer or smaller, or it
will return a full buffer and a status code saying that the
segment is not yet complete.
>But I may confuse something. Anyway, remote protocol requiresRight. There are no segment numbers.
>us to provide a size we want to fetch from the current position, not
>the segment number to fetch.
>Also, engine supports streem blobs (in fact arrays are stored asLength is easy in either case. Use the blob-info call. It returns
>streem blobs) and I plan to switch from segmented blobs to streamed
>blobs (at least to provide length() and seek() methods on blobs).
the number of segments (segmented only, of course), the length of
the longest segment (handy if you're constructing buffers on the
fly), and the total length of the blob. Seek works only on stream
blobs (because of the length bytes that occur at irregular intervals
in segmented blobs), but it provides three modes - from start,
from current position, and from end (requires a negative offset).
Regards
Ann