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
- XmlSchemaComplexContent.cs
- MemoryMappedViewAccessor.cs
- XslTransform.cs
- TemplateEditingVerb.cs
- Peer.cs
- DataListItemCollection.cs
- ParagraphVisual.cs
- Instrumentation.cs
- Util.cs
- HebrewCalendar.cs
- StorageFunctionMapping.cs
- DBDataPermission.cs
- ViewManager.cs
- ImageInfo.cs
- PathParser.cs
- TransformerInfo.cs
- Transform3DGroup.cs
- HttpRequest.cs
- VisualStyleElement.cs
- HostingEnvironment.cs
- AspCompat.cs
- StringAnimationUsingKeyFrames.cs
- ValidationResult.cs
- DataGridViewCellValueEventArgs.cs
- CategoryAttribute.cs
- ItemsPanelTemplate.cs
- SafeHandle.cs
- UserValidatedEventArgs.cs
- Connector.cs
- SqlDataSourceConfigureFilterForm.cs
- CopyOfAction.cs
- TreeNodeEventArgs.cs
- TransformConverter.cs
- TextOutput.cs
- ObjectDataSourceSelectingEventArgs.cs
- XPathPatternBuilder.cs
- IntellisenseTextBox.cs
- ButtonBaseDesigner.cs
- XmlSchemaNotation.cs
- ObjectFactoryCodeDomTreeGenerator.cs
- VerticalAlignConverter.cs
- SimpleRecyclingCache.cs
- RangeValuePatternIdentifiers.cs
- ExtendedPropertiesHandler.cs
- XpsS0ValidatingLoader.cs
- ReadOnlyHierarchicalDataSourceView.cs
- XmlValidatingReaderImpl.cs
- ColumnMapVisitor.cs
- Transform.cs
- CatalogZone.cs
- EditorZoneBase.cs
- ToolTip.cs
- TreeViewImageIndexConverter.cs
- XmlDataLoader.cs
- ManagementOperationWatcher.cs
- XmlReader.cs
- WebPartManager.cs
- WebPartVerb.cs
- ScriptManagerProxy.cs
- CodeSnippetExpression.cs
- Types.cs
- XD.cs
- ArrayMergeHelper.cs
- SourceItem.cs
- LoadGrammarCompletedEventArgs.cs
- ColorAnimationBase.cs
- GeneralTransform3DCollection.cs
- PriorityRange.cs
- XmlExtensionFunction.cs
- NonClientArea.cs
- SqlBulkCopyColumnMapping.cs
- MultitargetingHelpers.cs
- SafeNativeMethodsOther.cs
- InputMethod.cs
- ControlPropertyNameConverter.cs
- FontClient.cs
- BinaryCommonClasses.cs
- SimpleFieldTemplateUserControl.cs
- XsdSchemaFileEditor.cs
- PaginationProgressEventArgs.cs
- SqlBuilder.cs
- SettingsBase.cs
- ImageMetadata.cs
- HostedTcpTransportManager.cs
- StoreAnnotationsMap.cs
- CharacterMetrics.cs
- OperationDescriptionCollection.cs
- EnvelopedPkcs7.cs
- AssemblyCollection.cs
- IndependentAnimationStorage.cs
- ClientOptions.cs
- DebuggerAttributes.cs
- RowUpdatingEventArgs.cs
- XmlMembersMapping.cs
- MexTcpBindingCollectionElement.cs
- BufferedStream.cs
- HttpCookiesSection.cs
- HandlerBase.cs
- CompleteWizardStep.cs
- OrderedHashRepartitionStream.cs