Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / fx / src / Sys / System / IO / compression / Deflater.cs / 1 / Deflater.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // zlib.h -- interface of the 'zlib' general purpose compression library // version 1.2.1, November 17th, 2003 // // Copyright (C) 1995-2003 Jean-loup Gailly and Mark Adler // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would be // appreciated but is not required. // 2. Altered source versions must be plainly marked as such, and must not be // misrepresented as being the original software. // 3. This notice may not be removed or altered from any source distribution. // // // ==--== // Compression engine namespace System.IO.Compression { using System; using System.Diagnostics; internal class Deflater { private FastEncoder encoder; public Deflater(bool doGZip) { encoder = new FastEncoder(doGZip); } public void SetInput(byte[] input, int startIndex, int count) { encoder.SetInput(input, startIndex, count); } public int GetDeflateOutput(byte[] output) { Debug.Assert(output != null, "Can't pass in a null output buffer!"); return encoder.GetCompressedOutput(output); } public bool NeedsInput() { return encoder.NeedsInput(); } public int Finish(byte[] output) { Debug.Assert(output != null, "Can't pass in a null output buffer!"); return encoder.Finish(output); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // zlib.h -- interface of the 'zlib' general purpose compression library // version 1.2.1, November 17th, 2003 // // Copyright (C) 1995-2003 Jean-loup Gailly and Mark Adler // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would be // appreciated but is not required. // 2. Altered source versions must be plainly marked as such, and must not be // misrepresented as being the original software. // 3. This notice may not be removed or altered from any source distribution. // // // ==--== // Compression engine namespace System.IO.Compression { using System; using System.Diagnostics; internal class Deflater { private FastEncoder encoder; public Deflater(bool doGZip) { encoder = new FastEncoder(doGZip); } public void SetInput(byte[] input, int startIndex, int count) { encoder.SetInput(input, startIndex, count); } public int GetDeflateOutput(byte[] output) { Debug.Assert(output != null, "Can't pass in a null output buffer!"); return encoder.GetCompressedOutput(output); } public bool NeedsInput() { return encoder.NeedsInput(); } public int Finish(byte[] output) { Debug.Assert(output != null, "Can't pass in a null output buffer!"); return encoder.Finish(output); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- OneToOneMappingSerializer.cs
- HttpProfileGroupBase.cs
- ArrayList.cs
- ContextMenu.cs
- BooleanExpr.cs
- ImageListDesigner.cs
- EmptyImpersonationContext.cs
- ComponentConverter.cs
- ExceptionUtility.cs
- SQLDouble.cs
- ListCardsInFileRequest.cs
- EntityDataSource.cs
- ProcessModule.cs
- WsatConfiguration.cs
- SiteMapNodeItemEventArgs.cs
- AutomationPropertyInfo.cs
- DataGridViewRowPostPaintEventArgs.cs
- ManagementNamedValueCollection.cs
- ThreadStaticAttribute.cs
- RayMeshGeometry3DHitTestResult.cs
- MenuCommandsChangedEventArgs.cs
- ETagAttribute.cs
- MimeParameter.cs
- XmlSchemaSubstitutionGroup.cs
- DelegatedStream.cs
- TraceXPathNavigator.cs
- SynchronizedDispatch.cs
- TextBoxBase.cs
- WasAdminWrapper.cs
- BindToObject.cs
- MimeXmlReflector.cs
- ClientTargetSection.cs
- MLangCodePageEncoding.cs
- GridViewRowPresenter.cs
- NodeInfo.cs
- MemberHolder.cs
- XmlSchemaCollection.cs
- AsyncOperationManager.cs
- SmtpNetworkElement.cs
- SoapReflectionImporter.cs
- SQlBooleanStorage.cs
- OdbcDataAdapter.cs
- CreateUserWizard.cs
- WindowsScrollBar.cs
- ValueHandle.cs
- HostProtectionException.cs
- RoleServiceManager.cs
- ThicknessAnimationBase.cs
- StringFreezingAttribute.cs
- ChannelFactoryBase.cs
- StaticFileHandler.cs
- Control.cs
- LogWriteRestartAreaAsyncResult.cs
- WaitHandle.cs
- LocalizationComments.cs
- PersonalizationProviderHelper.cs
- BitmapEffectvisualstate.cs
- EnumValidator.cs
- FacetValues.cs
- ValueOfAction.cs
- XmlUtf8RawTextWriter.cs
- HMACSHA512.cs
- X509SubjectKeyIdentifierClause.cs
- IProvider.cs
- FolderBrowserDialog.cs
- WrappedIUnknown.cs
- GiveFeedbackEvent.cs
- InvokeBase.cs
- RouteData.cs
- WebConfigurationFileMap.cs
- AlgoModule.cs
- PropertyGroupDescription.cs
- PieceDirectory.cs
- AvTrace.cs
- HandlerBase.cs
- SecurityKeyType.cs
- DLinqTableProvider.cs
- HighContrastHelper.cs
- FirstMatchCodeGroup.cs
- HandlerBase.cs
- AttributeInfo.cs
- CodeDOMProvider.cs
- LinkLabelLinkClickedEvent.cs
- StandardBindingReliableSessionElement.cs
- ToolBarOverflowPanel.cs
- MenuItemStyleCollection.cs
- SynchronizationContext.cs
- MenuRendererClassic.cs
- Int16.cs
- ClientType.cs
- XmlTextAttribute.cs
- EncodingNLS.cs
- DBCSCodePageEncoding.cs
- HwndTarget.cs
- WebPartTransformerCollection.cs
- RoleService.cs
- SimpleLine.cs
- MyContact.cs
- ExtenderProviderService.cs
- OdbcConnectionPoolProviderInfo.cs