[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] Compressed streams

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2003-03-27 23:02:55 CET

Eric Dorland <eric.dorland@mail.mcgill.ca> writes:

> > > +svn_stream_t *
> > > +svn_stream_compressed (svn_stream_t *stream, apr_pool_t *pool)
> > > +{
> > > +#ifdef ZLIB
> > > +
> > > + struct svn_stream_t *zstream, *old_stream = (struct svn_stream_t *) stream;
> >
> > Is this cast necessary? Why use old_stream at all?
>
> No the cast isn't, but we need to use old stream. stream is of type
> svn_stream_t * which is opaque, so we need to make it a struct
> svn_stream_t *.

Huh? "svn_stream_t*" and "struct svn_stream_t*" are the same type are
they not?

> > > + static const char * const strings[NUM_TEST_STRINGS] = {
> > > + /* 0 */
> > > + "",
> > > + /* 1 */
> > > + "This is a string.",
> > > + /* 2 */
> > > + "This is, by comparison to the previous string, a much longer string.",
> > > + /* 3 */
> > > + "And if you thought that last string was long, you just wait until "
> > > + "I'm finished here. I mean, how can a string really claim to be long "
> > > + "when it fits on a single line of 80-columns? Give me a break. "
> > > + "Now, I'm not saying that I'm the longest string out there--far from "
> > > + "it--but I feel that it is safe to assume that I'm far longer than my "
> > > + "peers. And that demands some amount of respect, wouldn't you say?"
> >
> > How does the size of these strings relate to the 4096 above? Do you
> > need a test that has an input (or an output perhaps?) greater than
> > 4096?
>
> Good point. But the compressed representation of the string would need
> to be more than 4096, not just the size of the string, since the it is
> the read function that uses this buffer size. Any ideas how i could
> generate that data?

apr_generate_random_bytes? apr_pstrcat? apr_psprintf?

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Mar 27 23:03:38 2003

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.