Code:
/ DotNET / DotNET / 8.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

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- PopupRoot.cs
- WebPartConnectionsCloseVerb.cs
- coordinatorscratchpad.cs
- PathFigureCollection.cs
- ControlPager.cs
- HwndKeyboardInputProvider.cs
- HostProtectionException.cs
- PerformanceCounterPermissionEntry.cs
- DataServiceBehavior.cs
- DocumentGridPage.cs
- EntityDataSourceContextDisposingEventArgs.cs
- GridViewAutomationPeer.cs
- ProfileInfo.cs
- TabControlCancelEvent.cs
- Int32CollectionConverter.cs
- ProbeMatchesCD1.cs
- CapabilitiesSection.cs
- ServiceHostFactory.cs
- ChangePasswordAutoFormat.cs
- StoreAnnotationsMap.cs
- StatusBarAutomationPeer.cs
- XmlReflectionImporter.cs
- ToolboxItemSnapLineBehavior.cs
- PropertyStore.cs
- SharedUtils.cs
- ReadOnlyMetadataCollection.cs
- SupportsEventValidationAttribute.cs
- TextContainerChangedEventArgs.cs
- UmAlQuraCalendar.cs
- DesignerRegion.cs
- AdornerHitTestResult.cs
- BindingSource.cs
- AsyncResult.cs
- PolicyStatement.cs
- URLString.cs
- SvcMapFileSerializer.cs
- UrlPropertyAttribute.cs
- WhereQueryOperator.cs
- TextCompositionEventArgs.cs
- dataobject.cs
- ScriptMethodAttribute.cs
- TextEditor.cs
- _ScatterGatherBuffers.cs
- CompressedStack.cs
- ToolBarButtonClickEvent.cs
- CharacterBuffer.cs
- BitmapImage.cs
- PasswordTextNavigator.cs
- DbMetaDataColumnNames.cs
- ipaddressinformationcollection.cs
- ConfigurationLocationCollection.cs
- DataGridViewCellCollection.cs
- TextDecorationCollection.cs
- DrawListViewSubItemEventArgs.cs
- EFTableProvider.cs
- Vector3DIndependentAnimationStorage.cs
- CodeBlockBuilder.cs
- DocumentPageTextView.cs
- ImageIndexEditor.cs
- HttpResponseHeader.cs
- NumberSubstitution.cs
- LinqDataSourceStatusEventArgs.cs
- ConstraintCollection.cs
- XsltQilFactory.cs
- SymDocumentType.cs
- FlowDocumentReader.cs
- ImageInfo.cs
- XmlUTF8TextReader.cs
- HostingEnvironmentSection.cs
- HttpListenerResponse.cs
- PermissionSetTriple.cs
- CultureInfoConverter.cs
- CommandTreeTypeHelper.cs
- WsdlWriter.cs
- SamlAuthorizationDecisionClaimResource.cs
- PlanCompiler.cs
- ScriptingWebServicesSectionGroup.cs
- SplineKeyFrames.cs
- WebPartZone.cs
- ToolStripItemRenderEventArgs.cs
- HostingEnvironment.cs
- DesignerTransactionCloseEvent.cs
- EventData.cs
- RegexBoyerMoore.cs
- ByteRangeDownloader.cs
- ForceCopyBuildProvider.cs
- Classification.cs
- EncryptedKey.cs
- UserControlCodeDomTreeGenerator.cs
- CompilerError.cs
- LocalTransaction.cs
- OLEDB_Util.cs
- CurrentTimeZone.cs
- ZipIOExtraFieldElement.cs
- XmlSchemaDocumentation.cs
- Buffer.cs
- BuildDependencySet.cs
- Constants.cs
- RefExpr.cs
- StrongNameKeyPair.cs