You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// A stream that supports writing data smaller than a single byte. This stream also has a built-in compression algorithm that can (optionally) be used to write compressed data.
@@ -285,13 +301,10 @@ public void WriteBit(bool bit)
285
301
/// <param name="value">Value to write</param>
286
302
publicvoidWriteSingle(floatvalue)
287
303
{
288
-
lock(holder_f)
289
-
lock(holder_i)
290
-
{
291
-
holder_f[0]=value;
292
-
Buffer.BlockCopy(holder_f,0,holder_i,0,4);
293
-
WriteUInt32(holder_i[0]);
294
-
}
304
+
UIntFloatconversion=newUIntFloat();
305
+
conversion.floatValue=value;
306
+
uintbinary=conversion.intValue;
307
+
WriteUInt32(binary);
295
308
}
296
309
297
310
/// <summary>
@@ -300,13 +313,11 @@ public void WriteSingle(float value)
300
313
/// <param name="value">Value to write</param>
301
314
publicvoidWriteDouble(doublevalue)
302
315
{
303
-
lock(holder_d)
304
-
lock(holder_l)
305
-
{
306
-
holder_d[0]=value;
307
-
Buffer.BlockCopy(holder_d,0,holder_l,0,8);
308
-
WriteUInt64(holder_l[0]);
309
-
}
316
+
UIntFloatconversion=newUIntFloat();
317
+
conversion.doubleValue=value;
318
+
ulongbinary=conversion.longValue;
319
+
WriteUInt64(binary);
320
+
310
321
}
311
322
312
323
/// <summary>
@@ -315,13 +326,10 @@ public void WriteDouble(double value)
0 commit comments