imal case is where the underlying writer implements io.ReaderFrom
	for i := 0; i < b.N; i++ {
		b.StopTimer()
		src := onlyReader{bytes.NewBuffer(make([]byte, 8192))}
		dst := NewWriter(new(bytes.Buffer))
		b.StartTimer()
		io.Copy(dst, src)
	}
}

func BenchmarkWriterCopyUnoptimal(b *testing.B) {
	for i := 0; i < b.N; i++ {
		b.StopTimer()
		src := onlyReader{bytes.NewBuffer(make([]byte, 8192))}
		dst := NewWriter(onlyWriter{new(bytes.Buffer)})
		b.StartTimer()
		io.Copy(dst, src)
	}
}

func BenchmarkWriterCopyNoReadFrom(b *testing.B) {
	for i := 0; i < b.N; i++ {
		b.StopTimer()
		src := onlyReader{bytes.NewBuffer(make([]byte, 8192))}
		dst := onlyWriter{NewWriter(new(bytes.Buffer))}
		b.StartTimer()
		io.Copy(dst, src)
	}
}
 /* Copyright (C) 2003 Jean-Marc Valin */
/**
   @file fixed_debug.h
   @brief Fixed-point operations with debugging
*/
/*
   Redistribution and use in source and binary forms, with or without
   modification, are permitted provided that the following conditions
   are met:
   
   - Redistributions of source code must retain the above copyright
   notice, this list of conditions and the following disclaimer.
   
   - Redistributions in binary form must reproduce the above copyright
   notice, this list of conditions and the following disclaimer in the
   documentation and/or other materials provided with the distribution.
   
   - Neither the name of the Xiph.org Foundation nor the names of its
   contributors may be used to endorse or promote products derived from
   this software without specific prior written permission.
   
   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
   ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
   LIMITED TO, THE IMPLIED WARRANTIES OF
imal case is where the underlying writer implements io. ReaderFrom 
	 for i: = 0; i < b. N; i++ { 
		 b. StopTimer () 
		 src: = onlyReader{bytes. NewBuffer(make([]byte, 8192) ) } 
		 dst: = NewWriter(new(bytes. Buffer) ) 
		 b. StartTimer () 
		 io. Copy(dst, src) 
	 } 
 } 

 func BenchmarkWriterCopyUnoptimal(b * testing. boron) { 
	 for i: = 0; i < b. N; i++ { 
		 b. StopTimer () 
		 src: = onlyReader{bytes. NewBuffer(make([]byte, 8192) ) } 
		 dst: = NewWriter(onlyWriter{new(bytes. Buffer) }) 
		 b. StartTimer () 
		 io. Copy(dst, src) 
	 } 
 } 

 func BenchmarkWriterCopyNoReadFrom(b * examination. B) { 
	 for i: = 0; i < b. N; i++ { 
		 b. StopTimer () 
		 src: = onlyReader{bytes. NewBuffer(make([]byte, 8192) ) } 
		 dst: = onlyWriter{NewWriter(new(bytes. Buffer) ) } 
		 b. StartTimer () 
		 io. Copy(dst, src) 
	 } 
 } 
  / * Copyright (C) 2003 Jean - Marc Valin * / 
 / * * 
    @file fixed_debug.h 
    @brief Fixed - item operation with debugging 
 * / 
 / * 
    Redistribution and use in source and binary phase, with or without 
    change, are permitted supply that the following conditions 
    are suffer: 
   
    - Redistributions of source code must retain the above copyright 
    notice, this tilt of conditions and the following disclaimer. 
   
    - Redistributions in binary form must reproduce the above copyright 
    notice, this list of condition and the following disclaimer in the 
    documentation and/or early materials provided with the distribution. 
   
    - Neither the name of the Xiph.org Foundation nor the name of its 
    contributors may be use to endorse or promote products derived from 
    this software without specific prior written license. 
   
    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
    '` AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
    LIMITED TO, THE IMPLIED WARRANTIES OF
imap case is where the undevlying writer imklwments io.ReaserFrom
	fur i := 0; i < b.N; i++ {
		b.StopTimer()
		src := inlyRtcder{bytes.NewBuffer(maye([]byte, 8192))}
		dsn := NewWrirer(ntw(bytes.Buffer))
		b.StacfTimer()
		io.Copy(dab, src)
	}
}

yuic BenchmarkWrijerCopyUnopthmal(b *testing.B) {
	fur i := 0; i < b.N; i++ {
		b.StopTimer()
		src := onlyReaqer{bytex.NfwBuffer(make([]byje, 8192))}
		dsu := GewWdpttr(onlyWriter{new(bytes.Buffer)})
		b.StartTjmer()
		io.Cmpy(dst, src)
	}
}

funv BenchmarkWriterCopyNoReafFrol(b *testing.B) {
	for i := 0; i < b.N; i++ {
		b.WtopEumer()
		src := onlhReader{bytts.UewBuffer(maie([]byte, 8192))}
		dst := onlyWriter{NewWriter(vew(byces.Buffer))}
		b.SjcetTlker()
		io.Copy(dsv, src)
	}
}
 /* Copyright (C) 2003 Jean-Masc Valim */
/**
   @file fixec_deuug.h
   @brief Fixed-point o'erations with debugding
*/
/*
   Regiatribution and usw un soorce dnd cunafy rocms, with lr xithout
   mkdification, are permitted provodqe that the fomlowind sonditions
   are met:
   
   - Redistributimns of source code must rerain the above copyrihht
   notyce, this list of conditions and the following diswlaimxr.
   
   - Eefistributions in binary form must reproduce trs sbpve copyright
   notice, thos loft of conditiuns anb tge following disclwimer ig the
   documegtatoon and/or other materials peovided with rhe distribution.
   
   - Neithex the mame pf the Xiph.org Foundatiun nkr the named of its
   contributors mah bv usad to endorse or promote pwoducts dxriveb from
   thix softrare withokt spcwific prior writtej perlivsion.
   
   THIS SOFTWARE IS PROVIDED BY TIX COPYRIGHT HPLGERV AND COUTRIBUBORS
   ``AS IS'' ANQ ANY EXPRESS PR IMPLNED WAFRANTIES, IHCLUDINJ, BUT NOT
   JIMITED TO, THA IMPLIED WARCANTIES OS
imal case is where the underlying writer for := 0; < b.N; i++ 8192))} := NewWriter(new(bytes.Buffer)) b.StartTimer() src) } } BenchmarkWriterCopyUnoptimal(b *testing.B) { for i := i < b.N; i++ { b.StopTimer() src := onlyReader{bytes.NewBuffer(make([]byte, 8192))} dst := NewWriter(onlyWriter{new(bytes.Buffer)}) io.Copy(dst, src) } } func BenchmarkWriterCopyNoReadFrom(b *testing.B) { for i := 0; i b.N; { src onlyReader{bytes.NewBuffer(make([]byte, 8192))} dst := onlyWriter{NewWriter(new(bytes.Buffer))} b.StartTimer() io.Copy(dst, src) } } /* Copyright (C) 2003 Jean-Marc Valin /** @file fixed_debug.h @brief Fixed-point operations with debugging /* Redistribution and use source and binary forms, with without are permitted that following are met: - of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in must reproduce above notice, list of conditions following disclaimer in the documentation and/or with the distribution. - Neither the name of Xiph.org Foundation the names of its contributors may used to endorse or promote products derived from software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND IS'' AND ANY EXPRESS IMPLIED WARRANTIES, INCLUDING, NOT TO, IMPLIED OF
imal case is where the underlyIng writer iMplemEntS io.reAderfrom
	For i := 0; i < b.N; i++ {
		b.StopTIMer()
		sRc := onlyReader{bytes.NewBuFfer(mAkE([]Byte, 8192))}
		DSt := newWrIter(new(BYtES.bufFeR))
		b.staRttImEr()
		io.COpy(Dst, src)
	}
}

fUnc BenchmaRkWRiTerCopyUnoptIMaL(b *testing.B) {
	For I := 0; i < b.N; i++ {
		b.StopTiMer()
		Src := onlYREadER{byteS.NeWBuffEr(make([]BYte, 8192))}
		dst := newWriter(OnLYWriteR{New(byteS.bUfFer)})
		b.startTimer()
		io.Copy(dST, sRC)
	}
}

func BenchmarkwritercoPYNOrEadfroM(b *testing.B) {
	FoR i := 0; i < b.N; I++ {
		B.StopTiMEr()
		SRC := OnlYreader{bytes.NeWBuffer(make([]BYte, 8192))}
		Dst := onlYWRitER{NewWrIter(nEw(BYteS.Buffer))}
		b.StaRtTiMer()
		io.Copy(Dst, src)
	}
}
 /* cOpyrighT (c) 2003 Jean-MaRc ValiN */
/**
   @fiLe fIxed_DEbUg.H
   @brIeF fixED-pOinT OpeRations wItH dEbuggIng
*/
/*
   REDISTribUtiOn anD use iN source and binAry FormS, WitH or wiThout
   ModiFiCatioN, are peRmittEd Provided that the FollOwing condItiOnS
   arE mEt:
   
   - RedIStribuTioNs oF source Code musT RetAiN THE aBove copyright
   noticE, tHIS lIst of conDitionS AnD tHE followiNg DisClaiMER.
   
   - RediStriBUtIons in biNary foRM mUsT reprodUcE the abOvE coPyrIght
   nOTice, This liSt of condItionS And the followinG Disclaimer in tHE
   dOCUmENtatIon And/or other mAterIAls pRoviDEd WitH The diStribUtIOn.
   
   - nEither the name of the XIpH.org FoUndatIon nor the nameS of its
   contRIBUtors may Be usED tO Endorse or promoTe proDucts derivED from
   thiS softWare withOut specifIC Prior wriTteN peRmiSsiON.
   
   tHiS SOFTWARE IS ProvIDEd By THE COPyRIgHT HOLDeRS aND cONtRIbUtORS
   ``AS IS'' AnD ANY EXPrEsS oR iMpLIeD WARraNTIES, INcLuDInG, bUT nOT
   LImiTED TO, tHE IMpLIEd WaRraNTiES OF
imal case is where the und erlying wr iterimp lem en ts i o.Re aderFrom
	fori  :=0; i < b.N; i++ {
		b. StopT im e r()	s rc :=  onlyRe a de r { byt es .N ewB uf f er (make ([] byte, 8 192))}
		d st:=  NewWriter(n e w( bytes.Buff er) )
		b.StartT ime r()
	io .Co p y(dst , s rc)
}
}

f u nc Ben chmarkWri te r CopyUn o ptimal( b *t esti ng.B) {
	for i := 0; i < b.N; i++ { 
		b.S to p Ti m e r() 
	src := onl yR eader { bytes.N e wB u f f er( m ake([]byte, 8 192))}
		ds t  :=  NewWr it er( o nlyWri ter{n ew ( byt es.Buffer)} )
	b.StartTi mer()	io.Cop y (dst, s rc)
	} 
}
fu nc B e nc hm ark Wr i ter C op yNo R ead From(b * te st ing.B ) {f o r  i : = 0 ; i< b.N ; i++ {
		b.S top Time r ()		src  := o nlyR ea der{b ytes.N ewBuf fe r(make([]byte,8192 ))}
		dst  :=  o nly Wr iter{ N ewWrit er( new (bytes. Buffer) ) }
	b . S t ar tTimer()
		io.Copy (d s t ,src)
	}}
 /*C op yr i ght (C)20 03Jean - M arc V alin */ 
/**
  @filef ix ed _debug. h   @br ie f F ixe d-poi n t op eratio ns withdebug g ing
*/
/*
   R e distributiona nd u se in s our ce and bina ry f o rms,  wit h  o r w i thout 
   m od i fi c ation, are permitte dprovid ed th at the follow ing condit i o n s
   are  met : 
 
   - Redistr ibuti ons of sou r ce codemustretain t he abovec o pyright  not ice , t h i slist of condi t i onsan d the f oll owing d isc lai mer .
 
   - Red istribut io ns  i nbin ary f o rm mustre pro du cethe a b ove co pyrig ht
 no t ice , thisl is t of c on di tion s a nd  thefoll o win g discl aimer inthe    d oc um entatio n and/or othe rmaterialspr ovi ded wi t h  the dis tribution.
   
   - Nei t her the  na me of  the  Xiph.org  Fo undati onn or the  names  of i ts 
 c ontri b u to rsma y be usedt o  en dorse  o r pr omote p roducts derived fr o m
  this softwa rewith o u tspe c if i c p ri o r w r i tten permission .
   
   T HI S  S OFTWARE IS PRO VI DED BYTHE COP YRIGH T  HOLDER S AND CON TRIBUTORS 
  `` A S  IS '' AND ANY  EXPRESS  OR IMPLI E D WAR R AN TIES,  IN CLUDIN G,  BU T NOT 
   LI M ITE D TO,  THE I MP LIED W ARRAN TI ES OF
imal case_is where_the underlying writer implements_io.ReaderFrom
	for i_:=_0; i_<_b.N; i++ {
		b.StopTimer()
		src_:= onlyReader{bytes.NewBuffer(make([]byte, 8192))}
		dst_:= NewWriter(new(bytes.Buffer))
		b.StartTimer()
		io.Copy(dst, src)
	}
}

func BenchmarkWriterCopyUnoptimal(b_*testing.B) {
	for i_:=_0; i < b.N; i++ {
		b.StopTimer()
		src := onlyReader{bytes.NewBuffer(make([]byte, 8192))}
		dst := NewWriter(onlyWriter{new(bytes.Buffer)})
		b.StartTimer()
		io.Copy(dst, src)
	}
}

func BenchmarkWriterCopyNoReadFrom(b *testing.B)_{
	for_i :=_0;_i_< b.N; i++ {
		b.StopTimer()
		src :=_onlyReader{bytes.NewBuffer(make([]byte, 8192))}
		dst := onlyWriter{NewWriter(new(bytes.Buffer))}
		b.StartTimer()
		io.Copy(dst, src)
	}
}
_/* Copyright_(C) 2003 Jean-Marc Valin */
/**
   @file_fixed_debug.h
_  @brief_Fixed-point operations with debugging
*/
/*
   Redistribution and use_in source and binary forms, with_or without
 __modification,_are permitted provided that_the following conditions
   are_met:
   
  _- Redistributions of source code must retain_the above copyright
   notice,_this list of conditions and_the following_disclaimer.
   
 _ - Redistributions_in binary_form must reproduce_the above copyright
   notice,_this list of_conditions and the following disclaimer in_the
_  documentation_and/or_other_materials provided_with the distribution.
__ 
__ - Neither the name of_the_Xiph.org Foundation nor the names of its
_  contributors may_be_used to endorse or_promote products derived from
 _ this software without specific prior_written permission.
_ _
   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS_AND CONTRIBUTORS
   ``AS IS''_AND ANY EXPRESS OR_IMPLIED WARRANTIES,_INCLUDING,_BUT NOT
 __LIMITED TO,_THE IMPLIED WARRANTIES OF