Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / 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); } } }
Link Menu
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Parser.cs
- DependencyPropertyHelper.cs
- LinkLabel.cs
- StreamResourceInfo.cs
- PersonalizationProviderHelper.cs
- SQLDouble.cs
- CatalogPart.cs
- DataObjectSettingDataEventArgs.cs
- HttpResponseWrapper.cs
- Behavior.cs
- SqlMethods.cs
- EllipticalNodeOperations.cs
- MenuBase.cs
- MessageSmuggler.cs
- StringConverter.cs
- PropertyGrid.cs
- FileLoadException.cs
- SimpleType.cs
- AsymmetricKeyExchangeFormatter.cs
- TreePrinter.cs
- MultipartIdentifier.cs
- ConcurrentDictionary.cs
- HandleRef.cs
- SelectedDatesCollection.cs
- EventLogPermissionHolder.cs
- CodeSubDirectoriesCollection.cs
- GeneralTransform.cs
- XmlObjectSerializerWriteContextComplex.cs
- AttributeCollection.cs
- ExtensionElement.cs
- SelectionList.cs
- SqlDataSourceStatusEventArgs.cs
- LayoutTableCell.cs
- QuaternionAnimation.cs
- SQLStringStorage.cs
- UIntPtr.cs
- WebPartActionVerb.cs
- Timer.cs
- VirtualizedContainerService.cs
- ControlValuePropertyAttribute.cs
- DataGridViewCellStyleEditor.cs
- FlowLayoutSettings.cs
- DeviceSpecificDesigner.cs
- RunInstallerAttribute.cs
- DiagnosticsConfigurationHandler.cs
- DbDataRecord.cs
- RangeBaseAutomationPeer.cs
- FontFamilyIdentifier.cs
- Point.cs
- MarshalByRefObject.cs
- DesignerCapabilities.cs
- MaskedTextProvider.cs
- AnimationStorage.cs
- RadioButtonList.cs
- KeyFrames.cs
- SqlTypeSystemProvider.cs
- ComponentFactoryHelpers.cs
- Tablet.cs
- DiscoveryReferences.cs
- InputBinder.cs
- ChameleonKey.cs
- _RequestLifetimeSetter.cs
- DataSpaceManager.cs
- ItemDragEvent.cs
- RelatedCurrencyManager.cs
- ViewStateException.cs
- ReadOnlyDictionary.cs
- RoleManagerModule.cs
- VisualBrush.cs
- SafeJobHandle.cs
- DragDrop.cs
- GridViewColumnHeaderAutomationPeer.cs
- TableParagraph.cs
- EventArgs.cs
- DoubleLinkList.cs
- XmlSchemaProviderAttribute.cs
- PrintingPermissionAttribute.cs
- ErrorHandlerModule.cs
- RequestSecurityTokenResponseCollection.cs
- DataGridViewBindingCompleteEventArgs.cs
- XmlSerializationReader.cs
- SelectionItemProviderWrapper.cs
- PlanCompilerUtil.cs
- Expression.cs
- XmlWrappingReader.cs
- WindowsBrush.cs
- CharacterShapingProperties.cs
- Message.cs
- DtdParser.cs
- X509Certificate.cs
- OracleDataAdapter.cs
- DataGridViewBindingCompleteEventArgs.cs
- DbConnectionFactory.cs
- updateconfighost.cs
- RuleSetReference.cs
- DataGridViewLinkCell.cs
- DoubleConverter.cs
- DecimalFormatter.cs
- EdmItemCollection.OcAssemblyCache.cs
- XPathDocumentNavigator.cs