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
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- WebPart.cs
- Set.cs
- Stackframe.cs
- DynamicDocumentPaginator.cs
- InkCanvasSelectionAdorner.cs
- SafeCoTaskMem.cs
- PaintValueEventArgs.cs
- PenLineCapValidation.cs
- StrokeDescriptor.cs
- TextPattern.cs
- Exceptions.cs
- TemplateXamlParser.cs
- IntegerValidator.cs
- DataReceivedEventArgs.cs
- EntityDataSourceState.cs
- ReflectionTypeLoadException.cs
- ProxyElement.cs
- StructuralType.cs
- ArrayListCollectionBase.cs
- SQLDecimal.cs
- XmlSchemaSubstitutionGroup.cs
- ButtonChrome.cs
- ObjectListSelectEventArgs.cs
- FontDialog.cs
- ToolStripCustomTypeDescriptor.cs
- CompiledRegexRunner.cs
- Solver.cs
- SamlAdvice.cs
- AttachedAnnotationChangedEventArgs.cs
- TransformGroup.cs
- SqlXmlStorage.cs
- ColorEditor.cs
- ServiceCredentials.cs
- DesignerActionList.cs
- HtmlAnchor.cs
- InheritanceAttribute.cs
- CatalogPartCollection.cs
- DataControlCommands.cs
- RightNameExpirationInfoPair.cs
- SpellCheck.cs
- CanExecuteRoutedEventArgs.cs
- DocumentSignatureManager.cs
- MissingMethodException.cs
- EventLogger.cs
- XmlName.cs
- ProfilePropertyNameValidator.cs
- GlyphInfoList.cs
- AssociationProvider.cs
- TextViewBase.cs
- ToolBarTray.cs
- Knowncolors.cs
- CheckedListBox.cs
- ConstraintStruct.cs
- ColumnProvider.cs
- ListViewDataItem.cs
- ReadOnlyDictionary.cs
- SecurityPermission.cs
- SrgsSemanticInterpretationTag.cs
- Point4DValueSerializer.cs
- DateTimeAutomationPeer.cs
- Cell.cs
- securestring.cs
- AuthenticationService.cs
- ReadOnlyTernaryTree.cs
- File.cs
- FormsAuthenticationUser.cs
- SizeAnimation.cs
- FolderBrowserDialog.cs
- EtwTrace.cs
- CompilerError.cs
- Pkcs7Signer.cs
- AnimationStorage.cs
- QuaternionAnimationUsingKeyFrames.cs
- Normalizer.cs
- TypeBuilderInstantiation.cs
- ObfuscationAttribute.cs
- SemanticKeyElement.cs
- NamespaceEmitter.cs
- ListSortDescriptionCollection.cs
- RoleBoolean.cs
- CodeValidator.cs
- ISFClipboardData.cs
- MetadataItemEmitter.cs
- PartialCachingAttribute.cs
- MdiWindowListItemConverter.cs
- CacheDependency.cs
- PropertyManager.cs
- CompilerResults.cs
- TypeInfo.cs
- SByteStorage.cs
- StoreConnection.cs
- LoginName.cs
- ScriptIgnoreAttribute.cs
- WinFormsSecurity.cs
- ValidatingReaderNodeData.cs
- TdsParserSessionPool.cs
- BrowserDefinitionCollection.cs
- DataGridItemCollection.cs
- MobilePage.cs
- RoleManagerModule.cs