Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- DataViewManagerListItemTypeDescriptor.cs
- LineGeometry.cs
- ActivatedMessageQueue.cs
- OleDbEnumerator.cs
- PathData.cs
- DataServices.cs
- ImageMetadata.cs
- JournalEntryListConverter.cs
- ListView.cs
- MaterialCollection.cs
- FlagsAttribute.cs
- BlobPersonalizationState.cs
- InputGestureCollection.cs
- DataServiceHostFactory.cs
- XmlSchemaImport.cs
- TransformPatternIdentifiers.cs
- MsmqInputChannelListenerBase.cs
- ClassHandlersStore.cs
- FieldToken.cs
- GenericPrincipal.cs
- EventListenerClientSide.cs
- XmlSchemaImporter.cs
- UriParserTemplates.cs
- ToolStripRendererSwitcher.cs
- DataSvcMapFileSerializer.cs
- ScalarConstant.cs
- TextElementEnumerator.cs
- DataServiceRequest.cs
- ThreadInterruptedException.cs
- Object.cs
- Assembly.cs
- CurrencyWrapper.cs
- DesignerHelpers.cs
- ImageSource.cs
- DataContractSerializerSection.cs
- DataSourceListEditor.cs
- FixedDocument.cs
- DocobjHost.cs
- M3DUtil.cs
- JournalNavigationScope.cs
- SortedList.cs
- MasterPage.cs
- ColorConvertedBitmapExtension.cs
- SocketInformation.cs
- RelationshipConverter.cs
- TypeBuilder.cs
- DefaultMemberAttribute.cs
- UserControlCodeDomTreeGenerator.cs
- MethodBody.cs
- FixedTextView.cs
- DataControlCommands.cs
- SamlDoNotCacheCondition.cs
- ListView.cs
- RawStylusInput.cs
- TextSelectionHelper.cs
- ListBindingHelper.cs
- SoapObjectReader.cs
- COM2EnumConverter.cs
- RegisteredDisposeScript.cs
- TreeNode.cs
- CachingHintValidation.cs
- GeneralTransform3DCollection.cs
- ContainerAction.cs
- MultidimensionalArrayItemReference.cs
- PersistChildrenAttribute.cs
- InkCanvasSelectionAdorner.cs
- AsyncStreamReader.cs
- EncodedStreamFactory.cs
- BulletedListDesigner.cs
- PtsHost.cs
- VisualStyleElement.cs
- SparseMemoryStream.cs
- CategoriesDocumentFormatter.cs
- DocumentViewerHelper.cs
- EventMap.cs
- ClientApiGenerator.cs
- OrderPreservingPipeliningSpoolingTask.cs
- WebScriptMetadataInstanceContextProvider.cs
- LicenseProviderAttribute.cs
- GenericAuthenticationEventArgs.cs
- CheckBoxStandardAdapter.cs
- PropertyDescriptorCollection.cs
- PropertyValueUIItem.cs
- PropertyInfoSet.cs
- RangeBase.cs
- SafeWaitHandle.cs
- TextDecorationCollection.cs
- SByte.cs
- RelOps.cs
- SafeBitVector32.cs
- GeometryGroup.cs
- SystemBrushes.cs
- PluggableProtocol.cs
- SerializerDescriptor.cs
- XsltQilFactory.cs
- ISAPIApplicationHost.cs
- EnterpriseServicesHelper.cs
- CatalogPartChrome.cs
- ConfigurationCollectionAttribute.cs
- EventProvider.cs